On Wed, Nov 28, 2012 at 11:40 AM, Chris Lott <[email protected]> wrote:

> On Wed, Nov 28, 2012 at 7:31 AM, Matt Martini <[email protected]>
> wrote:
> > I have an autocmd that I would like to trigger for all files, except a
> > certain file.  Is there a way to write this?
>
> I think this basically answers your question:
>
>
> http://stackoverflow.com/questions/6496778/vim-run-autocmd-on-all-filetypes-except
>
> c
> --
> Chris Lott <[email protected]>
>
> --
> 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
>

If you really want to exclude on a specific file or pattern by name--say,
all *.vim EXCEPT a*.vim--you could check expand("<afile>") in an if
condition. (The Stack Overflow link talks mostly about filetypes, not the
actual name of the file.)

au SomeCondition *.vim if (expand("<afile>")) != "abcd.vim" | doStuff |
endif

Hope this helps,

Salman

-- 
سلمان حلیم

-- 
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

Reply via email to