Textobj-indent is a project mainly written in Vim Script, it's free.
Text objects for indented blocks of lines
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2484
textobj-indent is a Vim plugin to provide text objects to select a block of lines which are similarly indented to the current line.
For example, if the content of a buffer as follows: (here ">" means the current line under the cursor, and "_" means a space to indent)
if some_condition_is_satisfied
> __if another_condition_is_satisfied
____call s:do_x()
__endif
__...
__endif
else
__...
endif
|
if some_condition_is_satisfied
>|__if another_condition_is_satisfied
|____call s:do_x()
|__endif
|
|__...
|__endif
else
__...
endif
|
if some_condition_is_satisfied
>|__if another_condition_is_satisfied
|____call s:do_x()
|__endif
__...
__endif
else
__...
endif
More variants are also available. See |textobj-indnet-mapping| for the details.
Requirements:
Latest version: http://github.com/kana/vim-textobj-indent
Document in HTML format: http://kana.github.com/config/vim/textobj-indent.html