easier way to navigate between vim split panes

Omnipresent picture Omnipresent · May 19, 2011 · Viewed 21.2k times · Source

I am using NERDTree on vim and usually open files with i

Is there an easy way to switch between different panes? Currently I use CTRL+W+W to move from one pane to another.

Answer

overthink picture overthink · May 19, 2011

Long ago I found a tip (once on vim.org, now on wikia, apparently) that I've stuck with. Remap ctrl-[hjkl] to navigate splits. It has served me well.

" Use ctrl-[hjkl] to select the active split!
nmap <silent> <c-k> :wincmd k<CR>
nmap <silent> <c-j> :wincmd j<CR>
nmap <silent> <c-h> :wincmd h<CR>
nmap <silent> <c-l> :wincmd l<CR>