Scipion
Scipion

Reputation: 11888

Using windows shortcuts in vim

I was wondering if there was a way to use windows shortcuts in vim (in particular those used to select lines (with shift, alt, ctrl) ? Maybe an option to set in the .vimrc ?

Thanks.

Upvotes: 3

Views: 2790

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172510

You can enable this via the following command in your ~/.vimrc:

source $VIMRUNTIME/mswin.vim

See :help mswin.vim for a detailed explanation.


Alternatively, copy that script into ~/.vim/plugin/mswin.vim. This allows you to gradually comment out or tweak certain mappings. The downside of this plugin is that many Windows shortcuts conflict with Vim commands, so you're losing some features, and the completely different structure may prevent you from learning and using Vim effectively. Having started with a Windows background myself, this is how I proceeded. Now, I only use a few of those Windows mappings in Vim, and have customized several remaining ones so that they provide a true added value.

Upvotes: 6

Related Questions