Created
November 2, 2015 06:46
-
-
Save bitzip/c3133dc7a91dea70c1ec to your computer and use it in GitHub Desktop.
Vim close tab page and focus on the left
This file contains hidden or 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
let s:prevtabnum=tabpagenr('$') | |
augroup TabClosed | |
autocmd! TabEnter * :if tabpagenr('$')<s:prevtabnum && tabpagenr()>1 | |
\ | tabprevious | |
\ |endif | |
\ |let s:prevtabnum=tabpagenr('$') | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some plugins may workaround with a little tweak. E.g vim-fugitive: tpope/vim-fugitive@0fbbe0b