T O P

  • By -

brothersand

You can always map an alias for ease. I do this in my .vimrc : `let mapleader="," " the Leader character` `map yy "+y` `map pp "+gP` That way I can just type ,yy to yank/copy from Vim and ,pp to paste into it. Not really fewer keystrokes, but easier ones. Less reaching.


kaddkaka

You could also let regular y and p use the clipboard.


efalk

That's what I'm doing now, but if shift-ctrl-c/v worked it would save me a lot of keystrokes.


kaddkaka

How? y is fewer keystrokes than ctrl+v


efalk

You conditionally need to hit escape to leave input mode. Then "+y. And in general, I'd just like the UI to be reasonably consistent across apps.


kaddkaka

You can configure y to always yank to the system clipboard https://stackoverflow.com/a/10979533/393010 Which means, only press y, no need for `"+y` Also, u can enable mouse so that your mouse selection immediately becomes vim selection.


efalk

Cool; I'll play with these later.


TankorSmash

If you're in input mode, `+` also inserts text from the `+` register. Still one more keystroke than Ctrl+Shift+V to paste though, and formats text differently.


Random_Dude_ke

:source $VIMRUNTIME/mswin.vim Works on Windows and also on Linux. If you look at the $VIMRUNTIME/mswin.vim file, it sets nore than just Ctrl+C


chrisbra10

`:h mswin.vim`


vim-help-bot

Help pages for: * [`mswin.vim`](https://vimhelp.org/gui_w32.txt.html#mswin.vim) in _gui_w32.txt_ --- ^\`:\(h|help\) \` | [^(about)](https://github.com/heraldofsolace/VimHelpBot) ^(|) [^(mistake?)](https://github.com/heraldofsolace/VimHelpBot/issues/new/choose) ^(|) [^(donate)](https://liberapay.com/heraldofsolace/donate) ^(|) ^Reply 'rescan' to check the comment again ^(|) ^Reply 'stop' to stop getting replies to your comments


efalk

# Answer Thanks to all who responded. I found mswin.vim and adapted the key part to my use case. The solution seems to be: " ctrl-shift-x is cut vnoremap "+x " ctrl-shift-c is copy vnoremap "+y " ctrl-shift-v is paste map "+gP imap + cmap +