3 ms·
I use Bufkill and bufexplorer for a very special use case. I've got $EDITOR set to "gvim --remote --wait" which means that the file is opened in an existing in
by antileet 16y ago
I use Bufkill and bufexplorer for a very special use case.
I've got $EDITOR set to "gvim --remote --wait" which means that the file is opened in an existing instance of vim. Unlike "gvim --remote" which will return control to the shell the moment the file is opened in gvim, the --wait option forces the command to wait till the file is closed (which is the standard expected behavior for most things like writing git commits, etc).
Now the interesting problem is that I have to kill the buffer rather than quit the editor. so I do a :w and :bd to delete the buffer, which makes sure things go fine on the shell.
Sometimes, if I have opened the file in a split (which is invariably the case), using :BD will ensure that my split isn't closed as well, when the buffer is killed.
Plus, BufExplorer has a very neat little trick which I just discovered recently. Sometimes I can close a buffer and might have to reopen it. So I bring up Bufexplorer and press "u" to undo changes, and I can go reopen any of those buffers.