Sunday, June 18, 2023

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

On Sun, Jun 18, 2023 at 8:40 PM Salman Halim <salmanhalim@gmail.com> wrote:
>
> This isn't exactly what you asked for, but how about a custom command, such as Set, that calls a function to do the option set in a try/catch? If it succeeds, great. If it fails, you can just ignore it or use an echomsg or something.
>
> You won't know when a feature was introduced, but you also won't have to have existence checks around everything.
>
> Salman

This would work great… as long as you are certain in advance that the
Vim you're running on has a built-in (and non-buggy) try-catch
feature. This can be checked, of course, with
:if exists(':try') == 2
but I remember a time when that feature (introduced when? At some
point in Vim 7, I think) didn't exist. As a belt-and-suspenders man, I
try to make the fewest possible unsupported assumptions. ;-)

Best regards,
Tony.

--
--
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/CAJkCKXvY%3D4piHH721EcxfK_%2BOixU0BKtsq7wD7%3DS%3DmVZhtbaOQ%40mail.gmail.com.

No comments:

Post a Comment