Reputation: 33
How I can rebind escape key in vsvim (in Visual Studio 2015)? Now, I use esc or ctrl + [ to enter command mode, but I want to use df
keys instead. How I can rebind them?
I find out that I need to create .vsvimrc
file in my HOME directory and write there some command similar to nmap <df> :vsc MyCommand
. Is it right?
But I don't understand what exactly command must be instead "MyCommand".
Upvotes: 1
Views: 3108
Reputation: 3302
In Visual Studio VsVim on Mac, there is an option in settings:
Menu: Visual Studio > Preferences > Other > Vim Settings
I use jk
in the Insert mode escape binding
option and it works well. The .vimrc
change did not work for me but given this setting in the GUI, I did not further investigate why my rc
file wasn't being respected.
Upvotes: 0
Reputation: 1691
You do need a .vimrc
file. On a mac or linux computer it would go in your home directory. I'm guessing from your question that you might be on Windows. A brief google search indicates that the HOME directory on Windows is also probably right. If you want to check for sure, open vim, type :echo $HOME
, and press enter. It will print the file path. Also, on Windows this file should be called _vimrc
.
Once you've created your vimrc file include this line
inoremap df <esc>
You'll have to close vim and reopen it for the command work.
Upvotes: 6
Reputation: 33
I looked for this line: inoremap df <esc>
, because I use "escape" or "ctrl + [" to enter command mode from input mode.
Upvotes: 0