New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve implications of autocmd!
in docs
#1119
Comments
If you're calling augroup fxn
autocmd!
" Define the autocmds you want
augroup END |
I use it at the top-level. My use case is being able to source ~/.vimrc several times from within Vim. This is a use case documented in the help for I don't want to scope my autocommands, nor do I want to set a flag, the usage as documented is what I prefer for its simplicity. The problem here is that |
Let me quote:
That is what I did, I put the call before my autocommands, but after |
Okay, how about a documentation patch then? |
Yeah, I'd be glad to contribute one, but I don't have the perspective to document Vim.
In summary, I am not qualified to write Vim documentation. |
On Sep 26, 2016 19:51, "Xavier Noria" vim-dev-github@256bit.org wrote:
Note the "current group" phrase. If you don't scope with an augroup then Justin M. Keyes |
@vim-ml so is it the case that a top-level |
Xavier Noria wrote:
That example is incomplete, it should mention using a group to only
GUARD #1: What -- a swallow carrying a coconut? /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \ |
@brammool awesome, let me write a patch then. |
i think this can be closed. |
If you put
autocmd!
in ~/.vimrc aftersyntax on
, you get no syntax highlighting.A posteriori, this is telling me that the
:syntax
command has autocommands going on behind the scenes, but this is not obvious to the user. As a user, your interface is the command itself.Don't know enough Vim to contribute a patch that properly documents whatever needs to be documented to cover this gotcha, but at least I wanted to report it.
The text was updated successfully, but these errors were encountered: