category applies to 16 screencasts and 5 articles:
I’ve noticed a pattern running through a few recent episodes of Vimcasts: I’ll demonstrate one way of doing something, and remark that to revert the change requires two or more undos. Then I’ll demonstrate another way of doing the same thing, perhaps using functionality from a plugin, and this time I can revert the change with a single undo. That seems to me to be a good criteria for deciding which method is better: it’s the one that can be reverted with the fewest number of undos.Continue reading
When UltiSnips is triggered from Visual mode it captures the selection and makes it available to our snippets. We can then insert the selection unchanged with the
$VISUAL placeholder, or we can use UltiSnips Python interpolation to transform the text before inserting it back into the document.
Snippets allow you to quickly insert predefined chunks of text into your document. The feature as I know it was first introduced in TextMate, but it has since been emulated by many other editors. For Vim users who want this functionality, the UltiSnips plugin is a great choice. Let’s start by looking at the basics.Watch screencast
Choosing a key-map for your custom Vim commands can be difficult. The common advice is to use
<leader> for user-defined mappings, but that’s not the only option. There are dozens of two-key mappings that are not bound to any built-in functionality. These available mappings are easy to find if you follow a simple formula.
Vim’s built-in abbreviation feature is handy if you want to auto-correct words that you frequently misspell, but it requires a lot of setup. The
:Abolish command makes it easy to generate abbreviations that will correct multiple forms of the same word.
This is the final of a three-part series on Tim Pope’s abolish plugin.Watch screencast
The abolish plugin provides a command called
:Subvert, which is like a supercharged version of Vim’s built-in
:substitute command. The
:Subvert command is especially useful for changing singular and plural variants of a word, and for refactoring names that appear in
This is part two of a three-part series on Tim Pope’s abolish plugin.Watch screencast
:Subvert command lets us create a particular style of regular expressions with ease. It’s great for matching irregular singular and plural words in plain English and also for variable names that come in
This is part one of a three-part series on Tim Pope’s abolish plugin.Watch screencast
* command searches for the word under the cursor. That makes sense in Normal mode, but from Visual mode it would be more useful if the star command searched for the current selection, rather than the current word. We can add this feature to Vim using the visual star search plugin.
Vim users sit somewhere on a spectrum, based on how much they customize their editor. At one end of the spectrum, there are those who use Vim with no customizations whatsoever. At the other end are those who customize Vim to the point where it barely resembles the stock install.Continue reading
Git provides tools for searching the contents of files, commit messages, and even whether text was added or removed by a commit. In this episode, we’ll see how fugitive’s
Glog commands wrap this functionality up so that we can search the contents and history of a git repo from right inside of Vim.
This is the last of our five part series on fugitive.vim.Watch screencast
With the fugitive plugin, you’re not limited to just working with files in your working tree. The
:Gedit command allows you to open files in other branches, and to browse any git object, including tags, commits and trees. Plus, if your repository is hosted on github, you can easily bring up the webpage for any git object using the
This is the penultimate of a five part series on fugitive.vim.Watch screencast
When git branches are merged, there is always the chance of a conflict arising if a file was modified in both the target and merge branches. You can resolve merge conflicts using a combination of fugitive’s
:Gdiff command, and Vim’s built in
diffput. In this episode, we’ll find out how.
This is the third in a five part series on fugitive.vim.Watch screencast
The fugitive plugin provides an interactive status window, where you can easily stage and review your changes for the next commit. The
:Gdiff command visualizes the changes made to a file, by comparing the working copy with the index. In this episode, we’ll learn how to stage hunks of changes to the index without using the
git add --patch command.
This is the second of a five part series on fugitive.vim. In the next episode, we’ll learn how to resolve a git merge conflict by performing a 3-way vimdiff.Watch screencast
If you use Vim on muliple machines, it can be difficult to keep your configuration files synchronized across them. One solution is to put your dotfiles under version control. In this episode, I demonstrate how to keep your vimrc and plugins synchronized using git submodules and the pathogen plugin.Watch screencast