jeetsukumaran / vim-indentwise

A Vim plugin for indent-level based motion.
220 stars 17 forks source link

Feature request: indentation text object #3

Closed janko closed 9 years ago

janko commented 9 years ago

This is a really interesting plugin. I was wondering if it was possible to make a text object that would include "all lines with same or greater indentation". I would really like to be able to do something like ci%, and that the inner block of code is deleted.

I'm using Ruby and there is currently a plugin for Ruby block text objects, but it doesn't work properly (regexes should be improved). And I if your plugin would provide a text object for "blocks" (just based on indentation), that would work in all languages.

jeetsukumaran commented 9 years ago

The definitive indent-based text object is vim-indent-object. It works and it works well. I might incorporate it into this plugin later on, but right now I think the best option would be to install it side-by-side with this plugin.

janko commented 9 years ago

That's awesome, I didn't know this plugin existed. Sorry for not googling before.