[Fwd: Re: Switching between split buffers using keystrokes]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: Re: Switching between split buffers using keystrokes]

Fritz Mehner


Robert Cussons schrieb:

>Dear vim users,
>
>after using the :split command, I often want to switch between two buffers
>that I have opened in the same window. I have discovered one way to do this,
>quite by accident, which is to use <ctrl> - w, <ctrl> -w. Don't know why this
>works but it does the job. However it is not the most winning key combination
>for such a common task, does anyone know of a better one?
>Thanks,
>Rob.
>
>
>  
gVim only: I have the following lines in my  .gvimrc file.
So I can use   <Shift><arrow> to change the windows.
Regards,
Fritz
"
"-------------------------------------------------------------------------------
" Moving cursor to other windows
"
" shift down   : change window focus to lower one (cyclic)
" shift up     : change window focus to upper one (cyclic)
" shift left   : change window focus to one on left
" shift right  : change window focus to one on right
"-------------------------------------------------------------------------------
"
nmap <s-down>   <c-w>w
nmap <s-up>     <c-w>W
nmap <s-left>   <c-w>h
nmap <s-right>  <c-w>l
"