-
Usually you can easily detect whether a buffer will use autoccmds for writing just by checking its |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
All An alternative you might find helpful (depending on your use case) is to look for buffer names that look like URLs. Try |
Beta Was this translation helpful? Give feedback.
All
buftype=acwrite
does is tell Vim that the buffer name is "unrelated to a file". That is, it's identical tobuftype=nofile
, except it doesn't block:write
from working. This means, for example, that the buffer name won't be written to a session file, because if it's not related to a file, then you wouldn't be able to:edit
it. But you can editfugitive://
file names. As far as Vim is concerned, they are related to a (virtual) file.An alternative you might find helpful (depending on your use case) is to look for buffer names that look like URLs. Try
@% =~# '^\a\+:[\/][\/]'
(the backslashes are necessary to match on Windows).