diff --git a/README.md b/README.md index e201856..0d7389d 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ smart people at [Hashrocket](http://hashrocket.com/). ### vim - [Absolute And Relative Line Numbers](vim/absolute-and-relative-line-numbers.md) +- [Add A File Without Loading It](vim/adding-a-file-without-loading-it.md) - [Add Custom Dictionary Words](vim/add-custom-dictionary-words.md) - [Alternate Files With vim-rails](vim/alternate-files-with-vim-rails.md) - [Amend Commits With Fugitive](vim/amend-commits-with-fugitive.md) diff --git a/vim/add-a-file-without-loading-it.md b/vim/add-a-file-without-loading-it.md new file mode 100644 index 0000000..b0626a2 --- /dev/null +++ b/vim/add-a-file-without-loading-it.md @@ -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.