Friday, June 15, 2012

Re: pass full path into title bar

On 16/06/12 01:39, andy richer wrote:
> Hi All,
>
> I opened a file tmp under directory /a/b/c/d in unix environment.
> gvim opened it with title bar read "tmp ( /a/b/c/d) - GVIM3
>
> I then opened above file thru a utility called SOS(a check in & check
> out management software) and gvim opened it with title bar read "tmp
> (~/c/d) - GVIM".
> .gvimrc is under /a/b and SOS pop up window reads "SOS-6.23.p1: project
> @ (/a/b)
>
> inside .gvimrc
> title is set
> titlestring is empty
>
>
> Is there a way to configure gvim so that it always report full path in
> title bar regardless file opened in unix window or thru utility software?
>
> Thank you and Best Regard,
> Andy Richer
>
> --
> 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

'titlestring' is a 'statusline'-like option. If you want a specific
(nondefaut) title, you set it. For instance, having

if has('title')
set title titlestring=%F%y%m%r
endif

in your vimrc may (IIUC) give you something like one of

/home/andy/.vimrc [vim]
/usr/local/vim/vim73/doc/help.txt [help][-][RO]
</andy/.mozilla/firefox/x6gzb85n.default/chrome/userChrome.css [css][RO]

etc., with < and truncation at left if too long for the screen.

Notes:
1. Even if compiled with +title, you may fail to set it if running in
console mode in a terminal defined without the t_ts termcap setting.
2. When called from another application, you will probably be editing a
temporary file created by the calling application, and that temporary
file may have a weird name, even something as weird as "SOS-6.23.pl:
project @" under $HOME/c/d/.

See
:help 'title'
:help 'titlestring'
:help 'statusline'

Best regards,
Tony.
--
When I was younger, I could remember anything, whether it had happened
or not; but my faculties are decaying now and soon I shall be so I
cannot remember any but the things that never happened. It is sad to
go to pieces like this but we all have to do it.
-- Mark Twain

--
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:

Post a Comment