Wikia

Vim Tips Wiki

Changes: Safari style keybindings for tab navigation

Edit

Back to page

(Remove html character entities)
(change "anon" author to blank; trim "created" date; minor manual clean)
 
Line 3: Line 3:
 
|previous=1308
 
|previous=1308
 
|next=1311
 
|next=1311
|created=August 16, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
|author=Anon
+
|author=
|version=n/a
+
|version=6.0
 
|rating=73/22
 
|rating=73/22
 
|category1=Mac OS X
 
|category1=Mac OS X

Latest revision as of 03:02, December 4, 2009

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

Around Wikia's network

Random Wiki