Tutorial by Examples

You can use buffers to work with multiple files. When you open a file using :e path/to/file it opens in a new buffer (the command means edit the file). New buffer that holds a temporary copy of the file. You can go to previous buffer with :bp[rev] and next buffer with :bn[ext]. You can go to a...
Moving away from a buffer with unsaved changes will cause this error: E37: No write since last change (add ! to override) You can disable this by adding set hidden to your .vimrc file. With this option set your changes will persist in the buffer, but will not be saved to disk.
To easily select a buffer by filename, you can use: :b [part_of_filename]<Tab><Tab><Tab>...<Enter> The first Tab will expand the word to a full filename, and subsequent Tab presses will cycle through the list of possible matches. When multiple matches are available, you ...
<C-^> will switch to and from the previous edited file. On most keyboards <C-^> is CTRL-6. 3<C-^> will switch to buffer number 3. This is very quick, but only if you know the buffer number. You can see the buffer numbers from :ls or from a plugin such as MiniBufExplorer.

Page 1 of 1