Saturday, June 30, 2012

Re: where are those %F, %y, %f......

On 28/06/12 15:37, Charles Campbell wrote:
> Tony Mechelynck wrote:
>> On 27/06/12 16:55, Charles Campbell wrote:
>>> Bee wrote:
>>>>
>>>> On Jun 26, 2:51 pm, andy richer<andy.ric...@gmail.com> wrote:
>>>>> On Fri, Jun 15, 2012 at 5:28 PM, Tony Mechelynck<
>>>>>
>>>>> antoine.mechely...@gmail.com> wrote:
>>>>>
>>>>>> '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
>>>>>> Best regards,
>>>>>> Tony.
>>>>>> --
>>>>>> I tried to use :help %F, %y,... to find the definition above with no
>>>>>> luck.
>>>>> And by experiment I see %F shows ~/c/d/e.v, %f shows ./c/d/e.v if I
>>>>> opened e.v inside a utility called SOS.
>>>>> 1.
>>>>> Would anyone please advise me where can I find all those %x
>>>>> definition in
>>>>> gvim?
>>>>> 2.
>>>>> I modified above example to: set title titlestring=%{$PWD}/%f and it
>>>>> works in titlebar.
>>>>> The thing is that it shows "/a/b/c/d/e.v" where e.v is the file
>>>>> name.
>>>>> How can I show "e.v /a/b/c/d" in titlebar?
>>>>>
>>>>> Best Regards,
>>>>> Andy
>>>> :help titlestring
>>>> When this option contains printf-style '%' items,
>>>> they will be expanded according to the rules used for 'statusline'.
>>>>
>>>> :help statusline
>>>>
>>> Additionally, when one is perplexed about finding help for something in
>>> Vim's help pages, use helpgrep. Applied to your question:
>>>
>>> :helpgrep %F
>>> :cope
>>>
>>> would've pointed you in the right direction.
>>>
>>> Regards,
>>> Chip Campbell
>>>
>> In this case, the only uses of %F in the help are in an example under
>> 'titlestring' and in a TODO item.
>>
>> Bee's reply, and the line where I said earlier that 'titlestring' is a
>> 'statusline'-like option, should have pointed Andy the help for
>> 'statusline', where it is explained first that there can be
>> printf-style % items in the value of that option, and lower down
>> (about one page down with my 'guifont' in a maximized gvim) there is a
>> list of possible items. For %F, the relevant line is:
>>
>> F S Full path to the file in the buffer.
>>
>> and its meaning is explained in the help text that comes above it.
> Tony -- have you heard the phrase, "Give a man a fish and you feed him
> for a day. Teach a man to fish and you feed him for a lifetime"?
>
> I was attempting to "teach the man to fish".
>
> Regards,
> Chip Campbell
>

Aha. And what do you do when no fish bites on the kind of fishline you
taught him to use?


Best regards,
Tony.
--
Good day to let down old friends who need help.

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