Advanced filtering utilities in Vim

Efficient Search and Replace

© Lead Image © adimas, fotila.com

© Lead Image © adimas, fotila.com

Article from Issue 201/2017
Author(s):

Whether you are writing code or text, vim-abolish can help you customize search and replace functions in Vim.

Traditionally, vim-abolish is introduced by saying that what it does is hard to explain. This tradition dates back to its creator Tim Pope, who introduced it by saying that "I've deferred release, primarily because it's so gosh darn hard to explain" [1]. However, while exactly what is being abolished is uncertain, vim-abolish can best be described as advanced search and replace functions, roughly analogous to but less powerful than the command sed. It consists of four utilities: abbreviation (word completion), substitution, search, and coercion (case change). With a bit of organization, you can set up these utilities to use multiple forms of a word, such as different tenses, prefixes, suffixes, or spellings. With these tools, vim-abolish is equally useful for writing code or text documents.

Vim-abolish is installed by downloading the plugin from its homepage [1] to ~/.vim or ~\vimfiles, depending on your distribution. If you are using the plugin manager Pathogen, you can install Git and run the commands:

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-abolish.git

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News