Sunday, June 18, 2023

How to know in which patch a feature was added

In the beginning, I used a simple vimrc, basically ":se nu", etc. Those
features were available in all available Vim installations. Later when
I got into tweaking, I used nightly builds of Vim, so I always had the
latest features. But nowadays I have to work in a few ssh machines,
some of which have slightly older versions of Vim. Which means some of
my settings emit errors.

The proper way to handle this is with ":has()" and ":exists()". For
checking the existence of things like functions, autocommand events,
variables, etc., they work fine. Even for options, I can use exists().
But what about option values? Let's say I want to set 'wildoptions' to
use 'popupmenu'. This was introduced in a late patch of 8.2. The only
way I can include this setting with sanity check is by using ":if
has('patch-8.2.4325')". The problem is: I had to find the patch number
by using "git grep --log=pum".

Is there an easier way to find the patch number where an option was
introduced? Perhaps with ":helpgrep"?

--
Enan

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20230618231537.00006e42%40gmail.com.

No comments:

Post a Comment