vi - Vim: set 'cursor' keys hjkl to wasd also in normal and insert mode -


i have asked question here should add .vimrc map alt + a "h"; alt + s "j" , on. solution adding following .vimrc:

noremap <esc>a h noremap <esc>s j noremap <esc>w k noremap <esc>d l 

now, problem is, solution not work in insert mode (but works in normal mode). using imap results typing h,j,k,l, iunmap results error.

how set .vimrc make alt + wasd works hjkl "cursor keys" in insert mode?

to make work in insert mode add .vimrc

inoremap <esc>a <left> inoremap <esc>d <right> inoremap <esc>w <up> inoremap <esc>s <down> 

you have careful though, because may conflict other commands when you're switching out of insert mode. when instance want delete line you're editing, <esc>dd, these keybindings add d after next character.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -