-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration: Option to use only system clipboard for all yank & paste actions #2038
Comments
I disagree: I almost always use the registers instead of the system clipboard. It probably shouldn't take so much keybinding to change the behavior if you prefer using the system clipboard all the time though. Maybe a config option that controls the default yank register would be a good middleground? |
This is deliberate: I wanted to default to the system clipboard but since it's just a single clipboard it gets tricky with multiple selections: you wouldn't be able to yank all of them, just the primary one. |
In that case, this issue should be about making it possible to set the default register to the system clipboard in one's own config, without the remapping above.
Just like you said. There should be a "I only ever want to use one register, the system clipboard, for all yank & paste actions" option. (I used Vim for more than a decade, probably almost every day, and I get when I might want multiple registers, like when recording and playing back macros, but I've never understood why I'd want the yank & paste actions to use anything but the system clipboard by default. I really don't get why some people prefer that UI -- why have another separate default clipboard just for your editor?) |
@thomas-profitt can copying, cutting and pasting be done from and to the system clipboard in insert mode, too? |
As far as I see, the system clipboard now works just fine with multiple selections (#6985). I personally prefer to use the system clipboard if there is a feature-parity with the registers. |
With the # ~/.config/helix/config.toml
[keys.normal]
p = "paste_clipboard_after"
P = "paste_clipboard_before"
y = "yank_to_clipboard"
Y = "yank_joined_to_clipboard"
R = "replace_selections_with_clipboard"
d = ["yank_to_clipboard", "delete_selection_noyank"]
We don't want to make this behavior the default: using the clipboard for each yank can unexpectedly clobber the clipboard if you don't know you're yanking to the clipboard and it can add a lot of junk to clipboard history if you're using a tool like clipman. This being configurable is the goal for those who like using the clipboard by default. We've discussed this internally and don't want to add configuration options for things that can be accomplished through keybinding though, so I'm closing this out as not-planned. Those looking for this behavior should use the above config snippet. |
this is not quite the same, because it does not allow overriding the clipboard with |
Hmm yeah that's a good point. I was originally hesitant of #11430 but it might be the better solution here than remapping since I don't think it makes sense for these clipboard commands to accept a different register to yank into. |
(Related: #1901 )
I use the following config to use the system clipboard for yank, paste, replace and delete operations:
But, shouldn't using the system clipboard rather than internal registers be the default behavior?
Registers are very clean for things like when you want to do some special operation with the text in the register, but that can be implemented using the system clipboard too. It's useful to have separate registers, instead of just one, but it's much more common to want to use one register, especially when we often copy and paste text between the editor and different applications.
So, isn't it sensible for the default primary register to just be the system clipboard?
The text was updated successfully, but these errors were encountered: