I understand it's the place to put things that should have the final say and not be overridden by another source, but I'm unclear on how to decide when to put something in, say, ~/.vim/after/ftplugin/ rather than ~/.vim/ftplugin/.
Do people generally use ~/.vim/ftplugin/ and only move stuff into ~/.vim/after/ftplugin/ if they observe unwanted behavior, or do they just put it all in the after-directory right away?
if exists("g:loaded_<plugin name>")finishendiflet g:loaded_<plugin name> = 1. The plugin that's loaded first "wins" and subsequent plugins of the same name exit early through thefinishcommand. That's how a plugin in your~/.vim/plugindirectory, for example, can prevent a plugin in$VIMRUNTIME/pluginfrom loading completely. That test is not included inafterplugin files. – garyjohn Jun 27 '17 at 05:22finishguard-clause when you want to load only the first match, and use the after-directory (without afinishguard-clause) when you need to override a setting that's affected by one of the other sources. – ivan Jun 27 '17 at 12:12~/.vim/ftplugin, but without a guard-clause? What's the point in~/.vim/after/ftpluginthen? – intelfx Jun 03 '23 at 13:01~/.vim/after/ftpluginso that it has the last say. If the options set by your plugin are not affected by the existing plugin, you could put yours into either directory. – garyjohn Jun 04 '23 at 14:57