Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remap Ctrl-ArrowKeys to switch between split buffers

Tags:

vim

How can I remap Ctrl-ArrowKeys to move between split buffers, like I can with <C-w> <ArrowKeys>?

Right now <C-Right> deletes until the end of line and goes into insert mode - which is not what i prefer (I use C for this) and would be happy to get rid of this behavior.

like image 732
sumpfgottheit Avatar asked Aug 15 '11 21:08

sumpfgottheit


1 Answers

nnoremap <silent> <C-Right> <c-w>l
nnoremap <silent> <C-Left> <c-w>h
nnoremap <silent> <C-Up> <c-w>k
nnoremap <silent> <C-Down> <c-w>j

It must be said that not all mappings work on all terminal, so you mileage may vary. This is working well with gvim.

like image 136
Peter Rincker Avatar answered Oct 21 '22 20:10

Peter Rincker