Move quickly between tabs

2 Points

Chris Penner Chris Penner

9 years ago

Use H and L to navigate between previous and next tabs. 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 buffers, see Snippet #70.

" Move to the previous buffer
nnoremap H gT

" Move to the next buffer
nnoremap L gt

" Replace bottom and top
nnoremap zh H
nnoremap zl L

nnoremap _ L
nnoremap + H

Daniel Leong

Daniel Leong 9 years ago

Nice! Also, TIL about H and L.

I will nnoremap H gT instead to match h as left and l as right, but this is great. I'd been using ctrl-tab and ctrl-shift-tab. For buffers I use nnoremap <c-h> <c-w><c-h> and etc.

Chris Penner

Chris Penner 9 years ago

Ahh yes, I had the H and L mixed up on this one, fixed it now. And yes, I use <c-[hjkl]> for navigating splits and windows as well.