this post was submitted on 11 May 2024
555 points (96.8% liked)

Programmer Humor

20673 readers
632 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
(page 2) 48 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 9 months ago

Are they also replacing X with q! ?

[–] [email protected] 8 points 9 months ago (5 children)

Buffers are great. Comes very handy when creating macros in vim.

load more comments (5 replies)
[–] [email protected] 13 points 9 months ago (7 children)
[–] [email protected] 7 points 9 months ago (1 children)

Obligatory boo and/or hiss

I've also been meaning to give emacs a try but haven't found the time or energy to figure out how to exit vim

load more comments (1 replies)
[–] [email protected] 1 points 9 months ago

We be rocking that kill ring !

[–] [email protected] 8 points 9 months ago (1 children)

No, but I'm happy to talk to you about our lord and savior nano

[–] [email protected] 3 points 9 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 12 points 9 months ago* (last edited 9 months ago)

they have no use for copy buffers, they are still configuring emacs.

load more comments (3 replies)
[–] [email protected] 40 points 9 months ago (3 children)

ive never had to think about clipboard buffers until i used a modal editor.

now i spend %60 of my time trying to figure out where the copied symbol went.

[–] [email protected] 6 points 9 months ago

So far I haven't been brave enough for that feature. It's either "that main place yank goes", "system clipboard", or "that place that makes it disappear" for me

[–] [email protected] 8 points 9 months ago (2 children)

I don't have the name handy, but there's at least one plugin for vim that shows buffer previews in a popup. I've got it mapped to leader-sb (for "show buffer").

[–] [email protected] 4 points 9 months ago
[–] [email protected] 1 points 9 months ago

yah, helix has that in the info bar oob.

im just not thinking about that when im copying shit, i just want to copy paste like it's 1999.

load more comments (1 replies)
[–] [email protected] 21 points 9 months ago (1 children)

Same thing but reversed with multiple cursors :/

[–] [email protected] 8 points 9 months ago (4 children)

That's actually the biggest thing I miss about VSCode

[–] [email protected] 3 points 9 months ago (1 children)

Same here, but Atom. Maybe I should start using Atom again.

[–] [email protected] 3 points 9 months ago (1 children)

FYI atom project is dead. There is a community form available but it was to buggy for me.

[–] [email protected] 3 points 9 months ago

I know it's dead. I still have it, and it still does all I want from an IDE.

[–] [email protected] 2 points 9 months ago
[–] [email protected] 8 points 9 months ago (2 children)

helix has a pretty good mc system in the select mode.

[–] [email protected] 1 points 9 months ago

I've been meaning to check helix out for a while now but haven't found the time :(

[–] [email protected] 5 points 9 months ago (2 children)

search in selection is such a cool workflow

[–] [email protected] 1 points 9 months ago (1 children)

This feels like something I also do in neovim unless I'm misunderstanding you completely. Is it highlighting text and having yoir search apply just to the highlighted text?

If so, yes it's great whenever you use it

load more comments (1 replies)
[–] [email protected] 3 points 9 months ago* (last edited 9 months ago)

yah ive been swapping to hx wherever i need to do refactoring, it’s too good to miss out.

space-r ename symbol for easymode.

[–] [email protected] 9 points 9 months ago (2 children)

https://github.com/mg979/vim-visual-multi

I also missed multiple courses, but I started using vim-visual-multi in my nvim config and it's been great. There's a few others I tried that I couldn't get to work quite right (usually some weird conflict with nvim-cmp) but I've had the best success with vim-visual-multi.

[–] [email protected] 2 points 9 months ago

I'm gonma bookmark and try this next time I find the courage to mess around my nvim config. That last none_ls breaking change has made me very hesitant to mess around with things that aren't just colorschemes ngl.

load more comments (1 replies)
[–] [email protected] 37 points 9 months ago (2 children)

Gee, X11! How come your mom lets you have THREE clipboards?

[–] [email protected] 19 points 9 months ago

then theyre all ignored by x-clip

xD

[–] [email protected] 7 points 9 months ago (1 children)

Wait is that an actual thing?

[–] [email protected] 27 points 9 months ago* (last edited 9 months ago) (2 children)

Yes. X11 replaced X10's obsolete cut buffers (which can be modified by any process) with state-of-the-art selections. There are three selections in X11: a primary, a secondary, and a clipboard.

In modern desktops, the primary selection is overwritten every time you select some text (including in the terminal), which makes its content very ephemeral. You can paste it with the middle mouse button.

The secondary selection is generally not used, but it's present in the specification, and you can use xclip -selection secondary to access it. Wayland doesn't seem to have a secondary selection.

The clipboard selection is what most people understand to be THE clipboard. You have to write to it explicitly (through a keyboard shortcut, API, or CLI tool), and its content persists until it is overwritten, explicitly cleared, or the X server is killed. While the primary and secondary can only contain text, the clipboard can contain many kinds of data.

[–] [email protected] 2 points 9 months ago (2 children)

Okay I had no.idea. So on Plasma, I'm guessing when I copy anything, it's writing it both the primary selection, and the clipboard selection and that's how it stays in the clipboard manager thingy?

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 121 points 9 months ago (7 children)

Nevermind simply having an OS-level clipboard manager...

[–] [email protected] 5 points 9 months ago (1 children)
[–] [email protected] 1 points 9 months ago (1 children)

Ah, that is what I meant with OS-level clipboard manager (in fact, that is precisely what I thought of).

load more comments (1 replies)
[–] [email protected] 17 points 9 months ago (1 children)

Application specific buffers are the first thing I disable on emacs. The OS one isn't just integrated with every other normal piece of software, it's also more powerful and easier to use.

... at least on my Linux, YMMV.

[–] [email protected] 5 points 9 months ago

The os buffer is just another buffer that I can yank into.

[–] [email protected] 3 points 9 months ago

Nah that'd be too intuitive

In all seriousness though, I kinda appreciate moving things around in my editor without losing that one snipet I copied for later

[–] [email protected] 18 points 9 months ago (4 children)

There is for windows, and it's further improved if you get power toys too

load more comments (4 replies)
[–] [email protected] 67 points 9 months ago (3 children)

Win+V works decently enough for me.

[–] [email protected] 1 points 9 months ago

I'm don't know why but I've never used windows clipboard manager, which is weird because I go out of my way to make sure I have one when I'm on linux

[–] [email protected] 8 points 9 months ago (3 children)

I think windows+v syncs to microsoft servers or something. I remember when I was running chris titus tech's debloat script it removed that functionality.

[–] [email protected] 1 points 9 months ago (1 children)

An excellent option to have when one of the major use cases for clipboards is as an intermediary for password managers.

I hope they eventually get sued into the fucking ground.

load more comments (1 replies)
[–] [email protected] 10 points 9 months ago

I googled it, there is an option to sync it to your Microsoft account, but I can't say whether that's on by default when you turn on clipboard history because I skipped adding a Microsoft account. But if it is, you can turn it off in Settings -> System -> Clipboard.

[–] [email protected] 8 points 9 months ago

Holy crap I think that may be why I never used it. Fuck how much Windows likes to calls home

[–] [email protected] 41 points 9 months ago (2 children)

Same for plasma, global clipboard is just more convenient

[–] [email protected] 13 points 9 months ago

Global clipboard is chef's kiss. Back when I was on Ubuntu/Gnome, I had to install CopyQ but having one come with the OS is great

load more comments (1 replies)
load more comments (2 replies)
load more comments
view more: ‹ prev next ›