As title. I want to check that if current tab is the last (rightmost) tab, how?
1 Answer
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('$')