I would like to print all of my current autocmds to a file so that I can grep through and do further analysis.
From within vim, the list of autocmds can be found with :autocmd, but this prints to a pager within vim. I cannot grep the output of this command, and there are hundreds of entries for all of the ftdetect events.
This question also applies to other long paged output within vim, e.g. getting all mappings with :map, or highlight styles in the current buffer with :highlight.