0

How do I indent every line with a capital letter in vi with an ex command? The specific version I am using is elvis. I need to do this for a homework. I've searched help, but still trying to figure out how to navigate it. I'm using the US Constitution as the example.

1 Answer 1

1

You can use the global command and a substitution command together:

:g/^[A-Z]/s/^/^I/

Here, the ^I is obtained with [Control-V][TAB].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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