Subscribe for free with iTunes, Twitter, or RSS (Ogg or Quicktime).


Pasting from Insert mode


We don’t have to be in Normal mode to paste the contents of a register. The <C-r>{reg} command lets us paste a register from Insert mode (and it works in commandline mode too!) Using this command allows us to make changes that can be repeated with the dot command.

Continue reading…

Pasting from Visual mode


When used in Visual mode the p command replaces the selection with the contents of a register. This makes for a smooth workflow when you want to overwrite a selection, or swap the order of two regions of text.

Continue reading…

Using Vim's named registers


We’ve met Vim’s default register and the yank register. This time, we’re going to look at the named registers, which are handy if you want to cut or copy some text that you intend to paste multiple times.

Continue reading…

Meet the yank register


Vim’s default register is not a safe place to keep yanked text that you want to paste later. It’s all too easy to clobber the default register with a d or x command. Luckily, the last yanked text is kept safe in Vim’s yank register.

Continue reading…

Simple operations using the default register


Vim’s default register makes it easy to perform some of the most basic types of cut, copy, and paste operations. That’s partly thanks to the p command, which behaves differently depending on whether the default register contains a characterwise or linewise region of text.

Continue reading…

An introduction to vspec


Vspec is a library that allows you to test-drive your Vimscript code. In this tutorial, we’ll cover the basics: how to inspect the contents of a buffer, how to simulate the actions of a user, and how to invoke user-defined mappings.

Continue reading…

Enhanced abbreviations with :Abolish


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.

Continue reading…

Supercharged substitution with :Subvert


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 snake_case and MixedCase.

This is part two of a three-part series on Tim Pope’s abolish plugin.

Continue reading…

Smart search with :Subvert


The :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 snake_case and MixedCase forms.

This is part one of a three-part series on Tim Pope’s abolish plugin.

Continue reading…

Search for the selected text


The * 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.

Continue reading…