> IIRC, %!Function() didn't exist until tab pages were added to Vim; then 
> it was invented so that you could call one function to generate the 
> whole tab line (the text-style one, where you generate all tabs at one 
> go). Since there is only one tab line, it didn't need to be called again 
> for each window. The status line (one for each window) has already a lot 
> of predefined %x items, and %{} expressions need only be added for the 
> few non-predefined things which you might want to put into it.

%{} is useless for some complex statuslines: e.g. try to update the example 
(&stl part) to automatically delete items when window shrinks. Also note that 
%!-based solution is more robust (even while being a hack): you don’t need to 
rely on launched autocommands which are not always launched (I remember before 
current solution was created we used some hacks for command window; hacks for 
setting &stl for all windows at vim startup and incompatibility with some 
plugins that do not allow autocommands nesting or even open their windows with 
eventignore set). Old vim-powerline used this approach: %{} and updating on 
autocommands. You can workaround some problems by interacting through mutable 
globals, but such globals are bad on their own, not to mention `:h 'stl'` does 
not define the order in which %{} items are evaluated.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui