In my .vimrc I want to define several autocmd groups. Also, I want to avoid conflicts with any pre-existing groups. How can I list currently defined groups in Vim?
In my .vimrc I want to define several autocmd groups. Also, I want to avoid conflicts with any pre-existing groups. How can I list currently defined groups in Vim?
This actually doesn't appear to be documented in Vim's help (only mentions the commands to select or delete a group), but at least on my Vim 8.2.0318, the command
:augroupby itself lists all the defined autocmd groups.I get this on pretty much stock Vim setup:
The
:autocmdcommand, which lists all auto-commands will end up listing groups as well, but it's of course more convenient to get them directly from:augroup.If you want to get that into a Vim variable, use the
execute()function for it: