Am 26.03.2016 um 21:03 schrieb Gary Johnson:
> On 2016-03-26, Andy Wokula wrote:
>> if has("vim_starting")
>> " init on VimEnter
>> else
>> " init immediately
>> endif
>
> That's a very odd application of has().
>
> The has() function is clearly intended to indicate presence or
> absence of some feature that is compiled in, or in the case of
> "gui_running", available only under certain unchanging conditions.
> I would never think to look among features for a flag indicating the
> startup state. Even Bram did not find it.
Proper linking in the help should be enough?
> It's probably too late to change it, but I think it would make more
> sense to expose that state as a variable such as v:vim_starting or
> v:vim_did_enter or as a function such as vim_starting().
>
> Regards,
> Gary
It has been there for a long time (Vim 5.7 or earlier).
There are other "dynamic" items:
has("multi_byte_encoding")
has("syntax_items")
...
--
Andy
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment