* Jeff Lanzarotta [2006.10.19 13:13]:
> If there a way to check and see if the listchar
> is actually set or not?
For options I change often, I use the following to
display its value in the statusline.
function! OptSet(opt, string)
if(exists("a:opt") && expand(a:opt))
return a:string
else
return ""
endif
endfunction
Then put the following in the statusline:
set statusline=%<%f\%h%m%r%y%{OptSet(&ic,'[ic]')}[...]
^^^^^^^^^^^^^^^^^^^^
So in this specific case, if 'ic' is set, I will
have '[ic]' in my status line.
I use that for 'ic' and 'ws' because I toggle them
quite ofen.
HTH,
--
JR