Skip to content

Instantly share code, notes, and snippets.

@bitzip
Created November 2, 2015 06:46
Show Gist options
  • Save bitzip/c3133dc7a91dea70c1ec to your computer and use it in GitHub Desktop.
Save bitzip/c3133dc7a91dea70c1ec to your computer and use it in GitHub Desktop.
Vim close tab page and focus on the left
let s:prevtabnum=tabpagenr('$')
augroup TabClosed
autocmd! TabEnter * :if tabpagenr('$')<s:prevtabnum && tabpagenr()>1
\ | tabprevious
\ |endif
\ |let s:prevtabnum=tabpagenr('$')
augroup END
@bitzip
Copy link
Author

bitzip commented Nov 2, 2015

Some plugins may workaround with a little tweak. E.g vim-fugitive: tpope/vim-fugitive@0fbbe0b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment