Vim indent text objects for Coffeescript and Python

Do you write a lot of Coffeescript, Python, Jade templates, Haskell, or any other language that uses indentation? If you are like me, you may be sad to find out that your trusty ciB does not work anymore in Vim. ciB is “change inside block” which only matches inside () and {}. This is no good when we are dealing with languages like Python that use indentation instead of curly braces for block structures.

Luckily there is a plugin that adds this functionality:

Once you install this you can use vii or vai to see how it works. Use cii to change an entire indentation block.

Here’s a quick screencast to see how it works:

Good luck and happy Vimming!