Vimr: Request: command-shift-[ and command-shift-] to select next or previous tab, respectively

Created on 25 Sep 2018  Â·  4Comments  Â·  Source: qvacua/vimr

Please enable the following shortcut:

command-shift-[ - Next tab
command-shift-] - Previous tab

Every major application, like Terminal, Finder, Chrome, has this shortcut and I find it incredibly useful. The problem is even subconsciously try to use it in Vimr.

Most helpful comment

You can try adding these mappings to your init.vim:

if has('gui_vimr')
    nnoremap <S-D-{> :tabp<CR>
    vnoremap <S-D-{> :tabp<CR>
    inoremap <S-D-{> :tabp<CR>
    nnoremap <S-D-}> :tabn<CR>
    vnoremap <S-D-}> :tabn<CR>
    inoremap <S-D-}> :tabn<CR>
endif

All 4 comments

What about ctl+tab?

ctrl-tab and ctrl-shift-tab also works, but it's stupidly awkward to press. Support both I guess.

You can try adding these mappings to your init.vim:

if has('gui_vimr')
    nnoremap <S-D-{> :tabp<CR>
    vnoremap <S-D-{> :tabp<CR>
    inoremap <S-D-{> :tabp<CR>
    nnoremap <S-D-}> :tabn<CR>
    vnoremap <S-D-}> :tabn<CR>
    inoremap <S-D-}> :tabn<CR>
endif

@fanzeyi This is a good workaround for now, but it doesn't compare to a native UI support since you can't use these mappings in insert mode.

Also I'm a little disappointed that the tabs aren't actual UI tabs. You can't drag them around; so you can't do neat shortcuts like drag a tab from one window to another.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

risentveber picture risentveber  Â·  4Comments

crisidev picture crisidev  Â·  7Comments

tjdoc picture tjdoc  Â·  6Comments

TravisDart picture TravisDart  Â·  7Comments

cvincent picture cvincent  Â·  4Comments