Thursday, November 21, 2024

Re: load two plugins for one file type

Hello

I knew the "if exists" check was not right, but since it was a plugin I thought that it was required. Hence the setlocal's were moved before the "if exists" check. Will remove that check from the plugin.

Thanks for the information.

Regards

On Fri, Nov 22, 2024 at 12:52 AM D. Ben Knoble <ben.knoble@gmail.com> wrote:
On Thursday, November 21, 2024 at 2:20:36 AM UTC-5 Jürgen Krämer wrote:

If you don't do expensive calculations in your after-filetype-plugin I wouldn't bother to
include that check. The filetype plugin will only be executed a second time if you reload
the buffer anyway, and then it might actually make sense to set the options like you did
when you loaded the file the first time. (For example, I have not a single instance of this
code in my ~/.vim/after/ftplugin directly -- admittedly, there are only 21 vim scripts, but
some of them set a lot of options or define many mappings and abbreviations.)


Seconding: in https://github.com/benknoble/Dotfiles, I don't do a skip-load check in any of the after/ftplugin files. 

--
--
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 visit https://groups.google.com/d/msgid/vim_use/caa9d98b-5342-4a30-b197-596bcd0d20a1n%40googlegroups.com.

--
--
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 visit https://groups.google.com/d/msgid/vim_use/CA%2Bek4BG%3Dhm_HvoNP6jJF3pm%2Brd0PbKUTe95Ld%3DfVvL%2BYdOxvvA%40mail.gmail.com.

No comments:

Post a Comment