Tuesday, August 2, 2011

Re: vim statuline

On 02/08/11 13:12, sinbad wrote:
> On Aug 2, 3:21 pm, sinbad<sinbad.sin...@gmail.com> wrote:
>> i am using ctags.vim to display the function as statusline.
>> but function is never displayed in the status line. i debuged
>> the script, it seems to be correctly set the titlestring.
>> but title is not displayed. t_ts option is empty. should i
>> set this to something meaningful. btw, i run vim in a gnuscreen.
>>
>> thanks
>
> hi i got it working. but, i have one more question though.
>
> currently this is the titlestring in the script. and title_tag_name is
> c tag name.
>
> let&titlestring='%t%( %M%)%( (%{expand("%:~:.:h")})%)%( %a%)
> %='.s:title_tag_name
>
> with this, the status line is as follows. SetTagDisplay is the
> tagname, it is coming in the end of the status line.
>
> ctags.vim
> SetTagDisplay 343,1 Bot
>
> i want the tagname to be the first in the status line. as follows.
>
> SetTagDisplay
> ctags.vim
> 343,1 Bot
>
> i played with the options, but it's not working. please help.
>
> thanks
>

The order of results in a custom status line is the same as the order of
the % fields in your 'statusline' setting. 'titlestring', when supported
(and not all Vim versions support it) is the single title in the
titlebar at the top of the Vim screen, not the status line at the bottom
of every split window; but the same applies (the leftmost % field in the
setting appears leftmost on the title).

As said under ":help 'titlestring'", setting the title (at top of the
screen) is supported only in gvim, in the W32 and Amiga console
versions, and in console versions where t_ts is *not* empty. If t_ts is
empty (in a console version other than Windows or Amiga), then setting
the title is simply not supported by that Vim version on that terminal.
Setting a custom status line (at bottom of every split window) or a
custom ruler (at the bottom of the last window if it has no status line)
requires a Vim version compiled with the +statusline feature (as shown
in the top half of the output of :version, or by a nonzero reply when
asked ":echo has('statusline')" with the single quotes but without the
double ones)

See ":help 'statusline'" (with the single quotes but without the double
ones) for a description of % fields applicable not only to the
'statusline' option but also to 'titlestring', 'tabline', 'guitablabel',
'guitabtooltip' and 'rulerformat' (and maybe others of which I'm not aware).


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
149. You find your computer sexier than your girlfriend

--
You received this message from the "vim_use" 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

No comments: