3 ms·
I've been using Vim heavily for quite a while now. I almost exclusively open files with Fuzzy Finder (the Text Mate variant). I've never manually managed buffer
by snprbob86 16y ago
I've been using Vim heavily for quite a while now. I almost exclusively open files with Fuzzy Finder (the Text Mate variant). I've never manually managed buffers. I open and close splits frequently, but more or less treat my project as if it were entirely in memory at all times.
So, serious question: What benefit do you get from Bufexplorer, Bufkill, etc? Why should I ever think about buffers?
- antileet 16y agoI 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.