1

When i edit python file in gim

:3,10 <

That command can move lines between 3th and 10th to the left at 4 characters width. How to move the lines from 3 till 10 line left at one character width in vim?

0

2 Answers 2

2

Use the following commands

:echo(&shiftwidth)
Make note of result in brain
:set shiftwidth=1
:3,10 <
:set shiftwidth=(note made in brain)

Alternatively

:3,10 s/^ //
0
1

The anwolib plugin provides a neat :With ... Do command. With it, you can also automate (via a custom command or mapping) this easily:

:With sw=1 Do 3,10 <
2

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.