How to use tabs
Vim’s treatment of tabs is a little different than what you might be used to if you are coming from another editor. In this episode I demonstrate how Vim’s tabs can be used to group split windows together. I also show how to use Vim’s tabs like projects in TextMate, by setting a different working directory for each one.
Continue reading…Working with tabs
This episode covers the essential commands for working with Vim’s tab pages: opening and closing, switching, and moving them.
Continue reading…Working with windows
In Vim, you can view several buffers at once by loading them into multiple windows. This episode demonstrates all the essentials of working with windows: opening, closing, resizing, moving between and rearranging them.
Continue reading…Working with buffers
Introducing the buffer list, and commands for switching between buffers. This episode also covers the concept of ‘hidden’ buffers, and shows how to deal with them.
Continue reading…Indentation commands
This episode covers the commands for shifting text left and right (< and >), and also goes over the auto indent command (=).
Tidying whitespace
This episode demonstrates a few techniques for tidying up whitespace. First, it looks at how to convert between tabs and spaces. Then it shows how to strip trailing whitespace, and finally, how to remove blank lines from a file.
Continue reading…Whitespace preferences and filetypes
Different file types may require particular whitespace settings. For example, YAML files must be indented using spaces, whereas makefiles require indentation with tabs. These preferences can be specified by hooking into the FileType event with an autocommand.
Tabs and Spaces
Vim offers very granular control over whitespace. This episode explains the purpose of tabstop, softtabstop, shiftwidth and expandtab settings, and illustrates how Vim behaves using various combinations of these.
Show invisibles
Vim’s list feature can be used to reveal hidden characters, such as tabstops and newlines. In this episode, I demonstrate how to customise the appearance of these characters by tweaking the listchars setting. I go on to show how to make these invisible characters blend in with your colortheme.