Tuesday, May 1, 2018

Overwriting an autocmd for a particular filetype

Hi!


Let's say I have an autocmd defined in my .vimrc, which applies to every possible buffer (autocmd-pattern is set to *). Now, is there any way to override this autocmd only for a particular filetype? I mean, to disable this "general" autocmd and to use another one instead? With the help of after/ftplugin, probably?

(Wrapping this autocmd in augroup, and then resetting it in after/ftplugin/myfiletype.vim with autocmd! overwrites it globally, of course. Is there a less destructive way? Would be grateful for a hint :)


Thanks.


--
ds

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment