Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 711
Scipion Avatar asked Aug 24 '26 17:08

Scipion


1 Answers

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.

like image 138
Ingo Karkat Avatar answered Aug 27 '26 14:08

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!