Wikia

Vim Tips Wiki

Watchlist Recent changes

Safari style keybindings for tab navigation

Tip 1309 Printable Monobook Previous Next

created 2006 · complexity basic · version 6.0


Tab navigation for those of us using Macs, and used to the way Safari does it. Inspired by VimTip1221.

Add the following to your .gvimrc, restart gvim/vim7.0 and use the following keys:

  • <apple-t> : New Tab
  • <apple-]> : Next Tab
  • <apple-[> : Previous Tab
"custom tab stuff
" tab navigation like safari
" idea adopted from: [[VimTip1221]]
:nmap <D-[> :tabprevious<CR>
:nmap <D-]> :tabnext<CR>
:map <D-[> :tabprevious<CR>
:map <D-]> :tabnext<CR>
:imap <D-[> <Esc>:tabprevious<CR>i
:imap <D-]> <Esc>:tabnext<CR>i
:nmap <D-t> :tabnew<CR>
:imap <D-t> <Esc>:tabnew<CR>

CommentsEdit

Pages on Vim Tips Wiki

Add a Page
1,586pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
71photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki