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

Add Add A File Without Loading It as a vim til.

This commit is contained in:
jbranchaud
2015-11-15 09:45:33 -06:00
parent 3c628fb542
commit ca2fcd3a72
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Add A File Without Loading It
Generally, when you interact with files (e.g. `:e some-file.txt`), you are
both adding it to the buffer list and loading the contents of the file as a
separate buffer. The `:bad` command allows you to add a file to the buffer
list without loading it. For instance, you can add your `README.md` to the
buffer list and leave the current buffer in focus with:
```
:bad README.md
```
This command seems particularly useful for scripting the setup of an initial
vim environment or preparing for a `:bufdo` command.