On 13/02/14 16:38, Aaron Bohannon wrote:
Let's say I open a scratch buffer like this:

:new +set\ buftype=nofile

How can I set up an autocmd that will run when the buffer opens and have access to 
the information that &buftype == 'nofile'?


You may want to attach to a different event depending on what you mean by "when the buffer opens" but maybe

:au BufWinEnter * if &buftype == 'nofile' | call DoSomething() | endif

See :help autocommand-events


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
86. E-mail Deficiency Depression (EDD) forces you to e-mail yourself.

--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to