0

Sometimes I'll have some text with an arbitrary indentation.

                Sample text.

If I want to bring this text back to the beginning of the line, I'll visually select the line and then indent a large number of times. So I type V5<

Sample text.

Is there a better way to bring the indentation back to the beginning?

3

Use :left

From :h left:

:[range]le[ft] [indent]
            Left-align lines in [range].  Sets the indent in the
            lines to [indent] (default 0).
            Not available when |+ex_extra| feature was disabled at
            compile time.

You can also use :h center and :h right to align the current line to center and right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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