Monday, January 6, 2014

How can I write an autocmd-pattern that _excludes_ a single filetype?

I'm trying to write an autocommand that triggers for all filetypes except "netrw". I have a few candidate patterns that seem to work at the command line, but I can't seem to translate them into working patterns for the autocommand.

The command line versions:
^\(\(.*netrw.*\)\@!.\)*$
^\(.*netrw\)\@!.*$
\<\(.*netrw\)\@!.*\>

:h file-pattern describes the syntax for matching filenames, so I tried translating the above patterns assuming that it matches filetypes the same way. But nothing I've tried works so far.

Is this possible?

--
--
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/groups/opt_out.

No comments:

Post a Comment