Vim Tips Wiki

Debugging window autocommands

1,624pages on
this wiki
Add New Page
Talk0 Share
Tip 202 Printable Monobook Previous Next

created 2002 · complexity advanced · author Hari Krishna Dara · version 6.0

Don't know how people debug autocommands, but I just found out that you can debug (at least) those that result due to window close by just doing a debug quit, i.e.,

:debug quit

Vim will let you step into the autocommands. Try it to believe.


While going through the help pages, I figured this feature is documented with the following example:

:debug edit <file>

This should let you debug autocommands that get triggered by loading a new buffer.

There's also the :verbose command, with which you can specify the verbosity level for one command only:

:9verbose edit somefile.txt.gz

The verbose levels are documented in :help 'verbose'. The 'verbose' option variable sets verbosity permamently, not just for one command only.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki