Move quickly between buffers

2 Points

Chris Penner Chris Penner

4 years ago

Use H and L to navigate between previous and next buffers. I still use the default behaviour of H and L sometimes (Moves cursor to top and bottom of screen respectively), so I've remapped that to zh and zl, feel free to use + and _ instead.

If you prefer working with tabs, see Snippet #71.

" Move to the previous buffer
nnoremap H :bprevious<CR>

" Move to the next buffer
nnoremap L :bnext<CR>

" Replace H and L
nnoremap zh H
nnoremap zl L
nnoremap + H
nnoremap _ L

Martin Toma

Martin Toma 4 years ago

I actually like to map it like this: nnoremap + :bn nnoremap _ bp