Tuesday, March 31, 2009

Windows Key Re-maps

On Windows, Vim has slightly different behavior for a few basic keys. Namely, ctrl-v, ctrl-x, and ctrl-z are re-mapped to make them more familiar to Windows users. Ctrl-v, which is probably the most widely used of these, is re-mapped to ctrl-q. To get the equivalent of a ctrl-z (background process), you can issue the :suspend ex command. I don't believe there are re-mappings for ctrl-a (add) and ctrl-x (subtract); although, you can probably override them in mswin.vim.

3 comments:

graywh said...

Or, you could just not use mswin.vim at all and learn Vim.

Claes Mogren said...

A simple way to remap them to Ctrl-+ and Ctrl-- on the numpad on Windows is:

noremap <C-kPlus> <C-A>
noremap <C-kMinus> <C-X>

Mentioned that tip and some other stuff in a vim blog post a while ago.

skuggi said...

I prefer not using mswin.vim. There's so much other things you have to get used to in vim, you might as well get used to the normal windows things not working too. That way you don't have to used using different bindings in *nix and Windows. :)