Remap Ctrl-ArrowKeys to switch between split buffers
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.
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.
I also use those mapping when working with spli windows:
" To move between buffers and maximise the selected one
map <C-J> <C-W>j<C-W>_
map <C-K> <C-W>k<C-W>_
Combined with
" This sets the minimum window height to N
set wmh=0
It's pretty good. I have been used this for a while now and I'm completely addicted!
精彩评论