How can I mark the current tab's label with a star?

I have the following for the guitablabel

set guitablabel=%N/\ %t\ %M

I was wondering if there is a way to tweak it so that I have * in front of a current tab without defining another function.


Unfortunately, one cannot simply use tabpagenr() to query the current tab page. Apparently, Vim internally switches through the tab pages when evaluating 'guitablabel'. As a workaround, I use an :autocmd to set a tab-scoped variable. With that, one can use a %{...} expression to add the asterisk for the current tab page:

au TabEnter * let t:current = 1
au TabLeave * let t:current = 0
set guitablabel=%{exists('t:current')&&t:current?'*':''}%N/\ %t\ %M

Need Your Help

phpbb3 like and unlike issue

php phpbb phpbb3

Hi I am facing an issue the reputation system works perfectly fine when i use prosilver theme. but i am not getting the like and and unlike images in prosilver_se.i understood where is the problem ...

Sorting multidimensional array in PHP

php arrays multidimensional-array usort

I am currently creating a sorting method that consists of values from an mysql query.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.