Permalink
Browse files

.vimrc: Tab-switching amenities.

  • Loading branch information...
1 parent 776329f commit 148bf7aab9d8a2cf91aa751dc138c5284f4ae6f0 @eevee committed May 1, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 .vimrc
View
16 .vimrc
@@ -66,6 +66,22 @@ set scrolloff=2 " always have 2 lines of context on the screen
" Swaps selection with buffer
vnoremap <C-X> <Esc>`.``gvP``P
+" -/= to navigate tabs
+noremap - :tabprevious<CR>
+noremap = :tabnext<CR>
+
+" Bind gb to toggle between the last two tabs
+map gb :exe "tabn ".g:ltv<CR>
+function! Setlasttabpagevisited()
+ let g:ltv = tabpagenr()
+endfunction
+
+augroup localtl
+au!
+autocmd TabLeave * call Setlasttabpagevisited()
+augroup END
+autocmd VimEnter * let g:ltv = 1
+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Colors and syntax
" in GUI or color console, enable coloring and search highlighting

0 comments on commit 148bf7a

Please sign in to comment.