Today I Learned

hashrocket A Hashrocket project

Load A Directory Of Files Into The Buffer List

Consider the scenario where I want to go through all files in a directory to make a series of minor, related changes. After editing each file, I can type something like :e path/to/next/ to bring up the next file. That can get a bit tedious though. Instead, I can load up all the files in the directory with the args command:

:args path/to/files/*.md

From there, I can use :bnext (or :bn) and:bprevto more quickly jump through those files I want to edit. I can also run:ls` to see all the files loaded in to the buffer list at that point. source

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.