By default, the cut/copy/paste short-cuts in GVim on Ubuntu are:
Cut "+x Copy "+y Paste "+gP
I would like to use control key combos in GVim, like I use in Firefox and othe gnome applications. How do I configure GVim to work like other Gnome apps?
Add the following lines to your
But beware, visual mode is then CTRL-Q instead of CTRL-V.
For an overview what mswin.vim does see the mswin.vim sourcode. It is commented very well and if some command is unclear you can easily look it up in vim's help.
Here is a quick overview compiled from the source:
At Nippysaurus' request: I put following in my .gvimrc to show Ctrl-V besides Paste in the menu:
I didn't test it thoroughly, just a quick check if it did what I expected. Works for me, hope it works for you;-)
If you want Cut/Copy/Paste to work using the "standard" hotkeys, but you don't want to change any of the other configuration options in gvim, try do add the following to
Paste only works in Visual and insert mode, so you don't have to worry about the conflict with Ctrl-V and blockwise Visual Mode. This isn't a problem, because Copy and Cut put you into insert mode, so you can immediately paste afterwards. If you try it out you'll find that it feels completely natural.
I came up with this configuration after several iterations of tweaking, and I think it's "perfect" now. If you're even a little bit dissatisfied with your current copy/paste configuration, try this out and I bet you'll love it.
If you want to maintain the normal vim behavior but also allow for less cumbersome use of the system clipboard, see Accessing the system clipboard. If you would like gvim to use the system clipboard as its default buffer (so any
I personally use the buffers far more within vim than between vim and the system; so I'd rather have a slightly more cumbersome shortcut than have my system clipboard constantly clobbered. But it's nice that the option is there for those who would prefer it.
I would think you can add this with the :imap command (tried it just with Ctrl+X in Windows which worked, pressing ctrl+c seems to cancel the command though so you might have to do it in vimrc).
If you add it to your ~/.vimrc you just need to remove the : in front of imap.
imap only adds the bindings in insert mode, so you might want to change it to just map or something else. Look into
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?