Reputation: 522
I'd like to autoindent a range of lines in a Vim plugin I'm writing, but there doesn't seem to be an easy way. Short of an actual vimscript command, I've been looking for ex-mode commands I could use to trigger autoindenting, but I haven't found a way there either.
Is there any way to trigger the autoindentation of a range of lines in Vim, besides hitting just hitting "="?
Upvotes: 0
Views: 176
Reputation: 195289
why can't you use =? you could do
:normal! 3G=10G
to auto-indent 3,10 lines
Upvotes: 3