Vim Tips Wiki
Advertisement

Previous TipNext Tip

Tip: #1309 - Safari style keybindings for tab navigation

Created: August 16, 2006 11:43 Complexity: basic Author: Navigating Tabs on OS X (Mac) Version: n/a Karma: 73/22 Imported from: Tip#1309

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

Basically, 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>

Comments

Advertisement