Vim selection piping

In this post I would like to show a Vim1 trick I use often to do some repetitive editing tasks in a programmatic way. This is best explained by discussing an example. Think that you have a long list of values with duplicates and your task is to remove the duplicates and get the set of unique values. In my case, this kind of editing requirement is something which frequently comes up at work with data analysis queries....

February 28, 2021

Customising IdeaVim

Vim in IntelliJ IDEA IDEA is one of the IDEs with relatively good support for Vim with the IdeaVim Plugin2. Even though one can come close to functionality offered by IntelliJ with either Vim or Emacs Plugins, I find that IntelliJ IDEA is a must have for Scala development, in my experience. However, with IdeaVim Plugin you can still get the best of both world’s by leveraging your Vim editing muscle memory via IdeaVim plugin....

July 27, 2019

Vim Global Commands

Global command1 is a very powerful, and a little under-utilised command from my personal usage. Global command offers a powerful, composable alternative to macros. Use cases Usefulness of global commands is best explained through some practical examples. Using Vim global command to increment numbers <inventory> <item> <name>Coffee</name> <price>230</price> </item> <item> <name>Sugar</name> <price>280</price> </item> <item> <name>Tea</name> <price>120</price> </item> ... </inventory> Let’s say you have an XML file which looks as above, and you want to increase the price of the items by 100 each....

February 20, 2018