I’m looking for a method to map :q to :bwipeout only for SVN blame buffers, as generated by vcscommand.vim and :VCSBlame so that my motor memory of :q takes hold when I want to eliminate those short-lived read-only buffers.
The buffer names begin with SVN\ annotate <filename>, and so I hoped this would match:
autocmd BufNew SVN\ annotate* cmap q bwipeout
However, the buffer name doesn’t match this pattern. How can I make this mapping happen locally for buffers like SVN\ annotate*?
VCSCommand (which I recommend) gives its buffers special filetypes. For
:VCSBlameit’ssvnannotateif you use Subversion orgitannotateif you use Git.From my limited trial, this line does exactly what you want:
I’ve added
<buffer>just in case but I think you can remove it safely.