<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotvim/bundle/buffer-delete/plugin, branch master</title>
<subtitle>My vim configuration</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/'/>
<entry>
<title>Add 'buffer-delete' plugin</title>
<updated>2020-10-21T17:53:43+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2020-10-21T17:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=652e068e951464c1b37535a8fe34a448b6bf5742'/>
<id>652e068e951464c1b37535a8fe34a448b6bf5742</id>
<content type='text'>
I was having trouble with slow `&lt;C-p&gt;` 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was having trouble with slow `&lt;C-p&gt;` 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.
</pre>
</div>
</content>
</entry>
</feed>
