简体   繁体   中英

How to Alt-hjkl to move cursor stay in insert mode in vim?

In insert mode alt-hjkl will go to normal mode, i dont want.

I want alt-hjkl move the cursor and stay in insert mode.

So,try add this to vimrc but it doesn't work.

noremap! < Ah > < left >

noremap! < Aj > < down >

noremap! < Ak > < up >

noremap! < Al > < right >

any ideas ? :)

Correct usage is:

inoremap <A-h> <left>
inoremap <A-j> <down>
inoremap <A-k> <up>
inoremap <A-l> <right>

I use xmodmap to achieve such behavior, but I use Caps instead of Alt .

see solution on Superuser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM