As title. I want to check that if current tab is the last (rightmost) tab, how?


Just use the tabpagenr() function, which returns the number of the current tab page when called without any arguments, or the last tab page number when called with a '$'.

The following expression should tell you whether you're on the last tab:

tabpagenr() == tabpagenr('$')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.