On 2023-06-19, Enan Ajmain wrote:
> On Sun, 18 Jun 2023 14:40:20 -0400
> Salman Halim 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.
>
> Great idea! I learned about try-catch in VimScript only a few days ago.
> Don't know why it slipped my mind so soon. Thanks!
>
> I'll set up an user function, as you said, and iteratively replace "set"
> with "Set" for the options that I get an error for.
If all you care about is avoiding the error message, just use
:silent!, e.g.,
:silent! set wildoptions+=pum
Regards,
Gary
--
--
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/20230618194612.GF6600%40phoenix.
Sunday, June 18, 2023
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment