Hi VIMmers,
According to the user manual ":h statusline", we should be able to
evaluate a customized function to generate the statusline text:
-------------------- 8< --------------------
When the option starts with "%!" then it is used as an expression,
evaluated and the result is used as the option value. Example:
:set statusline=%!MyStatusLine()
The result can contain %{} items that will be evaluated too.
-------------------- 8< --------------------
But...
-------------------- 8< --------------------
:function! MyStatusLine()
: return 'test'
:endfunction
:set statusline=%!MyStatusLine()
-------------------- 8< --------------------
VIM complains:
E539: Illegal character <!>: statusline=%!MyStatusLine()
What seems to be the matter?
Regards,
Edward L. Fox