On Friday, January 28, 2022 at 2:43:04 PM UTC-5 Bram Moolenaar wrote:

>
> Otherwise, most plugins can just set b:undo_ftplugin. At least in the 
> example in the user manual we should not care about corner cases.
> Having an "after" plugin is unlikely, only a few users would have them. 
> There it can use exist() to check if the undo variable was already set. If 
> yes, then append with a bar, otherwise just set it.
>

Really? I find that this is the most idiomatic way to extend vim's filetype 
support (and possibly that of any installed plugins). _All_ my custom 
ftplugin files are in ~/.vim/after. I don't want to prevent other 
ftplugins; I want to overrule them or extend them on certain matters. So I 
want to be dead last.

https://github.com/benknoble/Dotfiles/tree/master/links/vim/after/ftplugin

And I do set b:undo_ftplugin. I used to do a complicated dance for edge 
cases; now I use a custom script which centralizes that, but still has to 
worry about it because some plugins are bad at setting undo_ftplugin.

https://github.com/benknoble/Dotfiles/commit/ab7f9d0acae97beef0c85492e5299300d5699efc#diff-ed3fb738f0892cdb0b1212bfb1791ce0064c2e4acc52e587f6b6b81ef44598a5
https://github.com/benknoble/Dotfiles/blob/master/links/vim/autoload/bk/ftplugin.vim

> Message ID: <vim/vim/issues/9645/[email protected]>
>

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/312ec92a-1ad1-49ac-b9b3-5f1efb462ec1n%40googlegroups.com.

Raspunde prin e-mail lui