Created
May 14, 2009 22:19
-
-
Save oelmekki/111962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" File: tab_alternate.vim | |
" Author: Olivier El Mekki | |
" Email: [email protected] | |
" Description: script allow to switch to the last seen tab, as the screen C-a a | |
" Usage: | |
" :Tabalter - go to the last seen tab | |
if exists('tab_alternate_plugin') | |
finish | |
endif | |
let tab_alternate_plugin = 1 | |
function! s:SetLastSeen() | |
let s:last_seen = tabpagenr() | |
endfunction | |
function! s:GetLastSeen() | |
silent! execute ":tabnext ". s:last_seen | |
endfunction | |
au TabLeave * call s:SetLastSeen() | |
command! Tabalter call s:GetLastSeen() | |
nnoremap <C-p> :Tabalter<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment