Monday, June 19, 2023

Re: How to know in which patch a feature was added

On Sun, Jun 18, 2023 at 11:15:37PM +0600, Enan Ajmain wrote:
> 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"?

I usually rely on helpful.vim (https://github.com/tweekmonster/helpful.vim)
when I need to find a version because I can't use has()/exists() to
detect a feature. Unfortunately I don't know if it can help with new
option values.

I've used git blame on the help file to roughly find the date, but help
file changes are sometimes committed separately from code changes.

Marius Gedminas
--
Seen on a button at an SF Convention:
Veteran of the Bermuda Triangle Expeditionary Force. 1990-1951.

--
--
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/yjfzakqzdbjeam62ci654poftyiwjbmee3ka4d6fusir4ttt4v%40leztqetrjufr.

No comments:

Post a Comment