You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
let s:prevtabnum=tabpagenr('$')
let s:prevtabid=tabpagenr()
augroup TabClosed
autocmd! TabEnter * :if tabpagenr('$')<s:prevtabnum && tabpagenr()>1 && s:prevtabid != tabpagenr('$')+1
\ | tabprevious
\ |endif
\ |let s:prevtabnum=tabpagenr('$')
\ |let s:prevtabid=tabpagenr()
augroup END
It work when NERDTree is not open. But if NERDTree is open, it will jump to the right tab after closing tab, and the gT cmd will skip the previous tab page go to the tab from the left side calculated second.