Friday, March 20, 2015

File matches multiple parts of an autocommand pattern

Is this the expected behavior?  If an autocommand pattern contains several parts, and a file matches more than one of them, then the autocommand is executed more than once.  For example, if I add this to my vimrc file

let foo_count = 0
augroup Foo
au Bufread,BufEnter *foo*,*bar* let foo_count += 1
augroup END

and edit foobar.txt, then foo_count is set to 2.

-- 
Benji Fisher
(I apologize for poor formatting.  I am using the web interface to Gmail.)

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