llakala / nixos

My NixOS config
3 stars 1 forks source link

Make helix yank less frustrating #58

Closed llakala closed 4 days ago

llakala commented 5 days ago

There are two ways to copy in Helix: to helix-specific clipboard, or to system clipboard. Pressing y will do the first one.

There are lots of annoyances with this first way.

First of all, each mode seems to have its own clipboard. This sucks for when I use the select mode to copy something, then go into normal mode to paste it, and huh, where'd it go? Ah dammit, it's only copied in the selection mode.

Second, sometimes I need to copy/paste via the system clipboard, for sending a message or pasting in code. I've looked it up and learned that you should do Space+Y and Space+P. Before, I had no clue how to do this.

I was planning on setting the system clipboard stuff to Ctrl+Shift+C and Ctrl+Shift+V, to match my intuition. But I realized that I should just rebind the yank and paste commands to use the system clipboard. After all, I really don't need a helix-specific clipboard. This will fix both of the above issues!

llakala commented 4 days ago

Done with 5da7d271fec61b4d091d77addbae3783f1d04b78. Also, I think I was wrong about having two different clipboards for each mode: after going through more of hx --tutor, i found that d and c actually yank the changed text. Ew. I've disabled that in 9a65dae7a9d5be17ff41c54e0c02345407bad733. Someday, we could come back to helix's clipboard, since it seems to have some useful functionality. But for now, disabling it is good for my quality-of-life.