diff options
author | Teddy Wing | 2020-10-21 19:38:21 +0200 |
---|---|---|
committer | Teddy Wing | 2020-10-21 19:53:43 +0200 |
commit | 652e068e951464c1b37535a8fe34a448b6bf5742 (patch) | |
tree | 69a1f1413d084c0f2c4d857c08a2f891a6e741b5 /bundle/write-with-spaces | |
parent | 9e00408c99b61561af6ead483626a614a8b54b05 (diff) | |
download | dotvim-652e068e951464c1b37535a8fe34a448b6bf5742.tar.bz2 |
Add 'buffer-delete' plugin
I was having trouble with slow `<C-p>` completion, and figured out it
was due to the fact that I had about 300 buffers open.
Many of these buffers weren't being actively used, and were just loaded
in from Vim sessions past. When I removed the unloaded buffers,
completion sped up like a whistle.
Thanks to 'sidyll' (https://stackoverflow.com/users/557306/sidyll) on
Stack Overflow for explaining how to get "all" buffer numbers (or at
least all possible buffer numbers up to the highest one open), as well
as the filtering logic:
https://stackoverflow.com/questions/17931507/vimscript-number-of-listed-buffers/17933352#17933352
I leveraged the above to get the buffer numbers of all unloaded buffers,
then delete the buffers by number.
It was originally a temporary command-mode line, but I decided it could
be beneficial to save the code just in case I need it again.
Diffstat (limited to 'bundle/write-with-spaces')
0 files changed, 0 insertions, 0 deletions