Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Conflict with user's config for TabEnter #74

Open
hmgle opened this issue Mar 17, 2016 · 0 comments
Open

Conflict with user's config for TabEnter #74

hmgle opened this issue Mar 17, 2016 · 0 comments

Comments

@hmgle
Copy link

hmgle commented Mar 17, 2016

I am using this vim config to jump to the left tab after closing current tab:

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant