1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Unloading A Buffer as a vim til.

This commit is contained in:
jbranchaud
2015-11-14 13:06:27 -06:00
parent 971e5bada5
commit a485f2da80
2 changed files with 29 additions and 0 deletions

28
vim/unloading-a-buffer.md Normal file
View File

@@ -0,0 +1,28 @@
# Unloading A Buffer
My preferred workflow with vim involves working across as many buffers as I
need in a single window. I open files in new buffers as needed and navigate
between existing ones with a number of built-in vim features and plugin
shortcuts. Eventually though, my list of buffers gets a bit crowded making
it difficult to move around and keep everything straight. One method for
dealing with this is occasionally unloading the buffers you no longer need.
This can be accomplished with `:bd`.
To unload the current buffer:
```
:bd
```
To unload some other buffer by buffer number, say buffer 10:
```
:10bd
```
Caveat: unloading a buffer marks it as *unlisted* in the buffer list,
meaning it won't appear in your normal view of the buffer list. It should
also be noted that it does not remove it from the jump list or the global
mark list.
See `:h :bd` for more details.