TIL that in vim, you can press <C-Tab> (or g<Tab>) to jump to the last accessed tab page

riz
2023-06-26T20:44:59Z

Previously I used to have this in my .vimrc:

if !exists('g:lasttab')
  let g:lasttab = 1
endif
nmap <C-Tab> :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()

Courtesy of: https://stackoverflow.com/a/2120168

But while going through the help docs today, I stumbled across this mapping and am glad to find that this now exists by default. When it got added, however, I don't know.

Comments URL: https://tildes.net/~comp/170z/til_that_in_vim_you_can_press_c_tab_or_g_tab_to_jump_to_the_last_accessed_tab_page

Votes: 18

Comments: 4