Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in vim, how I can selected the lines with the same indent, example

if true: 
    line 1
    line 2
    line n

if the cursor is over line 2, how I can selected from line 1 to line n?

share|improve this question
up vote 2 down vote accepted

Take a look at vim-indent-object.

share|improve this answer
amazing! with this I can sort attributes in CSS, in normal mode vii:!sort :) – juanpablo Jan 29 '12 at 20:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.