Thursday, May 12, 2016

BufNew not triggered for matching file specified on the command line

I have the following in my ~/.vim/filetype.vim:

augroup markdown
    au! BufNew *.md echom "I was called"
augroup END

This gets executed if I launch vim, then execute:

    :e foo.md

However, if I launch vim like so:

    $ vim foo.md

This does not get called - the message is missing from :messages

This behaviour appears to contradict the docs:


Is this a bug?

Here's my :version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr  1 2016 13:05:21)
MacOS X (unix) version
Included patches: 1-1655
Compiled by Homebrew
Huge version without GUI.

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