I found this
:help window-move-cursor, but I tried to call it from the command line and doesn't work.
Is there a way to change the key mapping for switch windows?
You can invoke any normal mode mappings via
<C-w> used by the window movements is a challenge; you need
:execute to evaluate the
:execute "normal! \<C-w>j"`
However, there's the special
:wincmd that simplifies the invocation; the above example becomes
Now, if you want to change the key mappings, that can be done via
:nnoremap <F7> <C-w>j
To add to the Ingo's answer here is a set of config that allows you to move to other panes using Control and a movement key.
nnoremap <C-h> <C-w>h nnoremap <C-j> <C-w>j nnoremap <C-k> <C-w>k nnoremap <C-l> <C-w>l
The following works, it's an example in the help for the 'normal' command:
:exe "normal \<c-w>\<c-w>"