Enhanced abbreviations with :Abolish

#49

Run time:
3:09

Apr 29, '13

Apr 29, 2013

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.

Download

Vim’s built-in abbreviations feature can provide auto-correct functionality. For example, we could make Vim auto-correct ‘colour’ (the British spelling) to ‘color’ (the American spelling) by running this command:

:iabbrev colour color

However, abbreviations are case sensitive, so if we wanted to trigger the auto-correction on ‘Colour’, we’d have to create another abbreviation. The same goes for ‘COLOUR’, as well as for ‘colours’, ‘coloured’, ‘colouring’, and so on.

The abolish plugin, by Tim Pope, provides a solution for this. It includes a smart command called :Abolish, which has a similar form to the built-in iabbrev command.

Browse similar content

Level-up your Vim

Training

Boost your productivity with a Vim training class.
Join a public class,
or book a private session for your team.

Drew hosted a private Vim session for the shopify team that was one of the best workshops I have ever attended.

John Duff, Director of Engineering at Shopify

Publications

Make yourself a faster and more efficient developer with the help of these publications, including Practical Vim (Pragmatic Bookshelf 2012), which has over 50 five-star reviews on Amazon.

After reading it, I've switched to vim as my default editor on a daily basis with no regrets. ★★★★★

Javier Collado

Learn to use Vim efficiently in your Ruby projects

In association with thoughtbot, one of the most well respected Rails consultancies in the world, I've produced a series of screencasts on how to make navigating your Ruby projects with Vim ultra-efficient.
Along the way, you’ll also learn how to make Ruby blocks a first-class text object in Vim.
This lets you edit Ruby code at a higher level of abstraction.
Available to buy from thoughtbot..