I used to know this keyboard shortcut which makes you move around Vim tabs in the terminal, similar to Ctrl+tab in a browser.
I've been looking all over the Internet and I can't find it anymore. Any ideas?
P.S.: You had to press two letters simultaneously.
To switch to the next tab, use :tabn, and to switch to the previous tab, use :tabp (short for tabnext and tabprevious respectively). You can also jump over tabs by using :tabn 2, which will move to the second next tab. To jump to the first tab, use :tabr (tabrewind) and to jump to the last tab use :tabl (tablast).
Press Ctrl + Shift + Tab (or Ctrl + Page Up) on your Windows or Linux computer.
Switch to previous or next tab On Windows, use Ctrl-Tab to move to the next tab to the right and Ctrl-Shift-Tab to move to the next tab to the left.
To replace ctrl-w on Windows/Linux for Vim users! # Better Ctrl-W Vim users are used to using the `Ctrl-w` key combination for deleting the last word when in insert mode. That's no problem for Mac OS users when using chrome, as the keyboard shortcut for closing a tab is Cmd+w.
gt
is the keyboard shortcut for :tabnext
and gT
for :tabprevious
.
If you prefer the typical Ctrl + Tab, define the following mappings in your ~/.vimrc
:
" CTRL-Tab is next tab noremap <C-Tab> :<C-U>tabnext<CR> inoremap <C-Tab> <C-\><C-N>:tabnext<CR> cnoremap <C-Tab> <C-C>:tabnext<CR> " CTRL-SHIFT-Tab is previous tab noremap <C-S-Tab> :<C-U>tabprevious<CR> inoremap <C-S-Tab> <C-\><C-N>:tabprevious<CR> cnoremap <C-S-Tab> <C-C>:tabprevious<CR>
This is taken from Vim Wikia:
gt go to next tab gT go to previous tab {i}gt go to tab in position i
http://vim.wikia.com/wiki/Using_tab_pages
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With