A slightly easier way to move between buffers
The :b command doesn’t just accept buffer numbers — it also accepts file paths. What’s more is that you can use tab completion to get a list of the buffers that are available!
Let’s try this. This time, we have some files called foo.txt, bar.txt, and baz.txt. Open them with the :e command. Once you’ve got the files loaded into buffers, type :b followed by a space, then hit the tab key on your keyboard. You can then use the tab key to walk forward through the list.
Pro tip
If you want to open foo.txt, bar.txt, and baz.txt all at the same time, you can use :args *.txt. We’ll learn more about the :args command and the arglist in a later lesson.