Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many machines i need to work with have basic NIX installation with vim as text editor. But vim's way to select text is kind of unusual to me :). Is it any easy way to re-configure vim so it will use shift in order to select text and ctrl+c / ctrl+v for copy and paste?

share|improve this question
up vote 13 down vote accepted

Add the following lines to your _vimrc or .vimrc

source $VIMRUNTIME/mswin.vim
behave mswin

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 compile from the source:

  • backspace and cursor keys wrap to previous/next line
  • CTRL-X and SHIFT-Del are Cut
  • CTRL-C and CTRL-Insert are Copy
  • CTRL-V and SHIFT-Insert are Paste
  • Use CTRL-Q to do what CTRL-V used to do
  • Use CTRL-S for saving, also in Insert mode
  • CTRL-Z is Undo; not in cmdline though
  • CTRL-Y is Redo (although not repeat); not in cmdline though
  • Alt-Space is System menu
  • CTRL-A is Select all
  • CTRL-Tab is Next window
  • CTRL-F4 is Close window
share|improve this answer
What else this option reconfigures? – Kazimieras Aliulis Jun 18 '09 at 10:31
Thanks, that partially works. But on some platforms ctrl+v still don't insert - it just draws a blue '^' O_O. – Eye of Hell Jun 18 '09 at 10:57 Added to the answer. – Ludwig Weinzierl Jun 18 '09 at 11:24
@Eye of Hell: This is the expected behaviour if mswin.vim is not active, but it's difficult to say why without further information. – Ludwig Weinzierl Jun 18 '09 at 11:26
The source link is broken; here's where I found it: . Hopefully the same file. – BiGYaN 23 hours ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.