I added some lines in i开发者_如何学Pythonnsert mode and now I would like to run some command only on these edit. How to perform it?
Marks '[
and ']
locate the start and end lines of newest inserted or changed text. From this, you can simply run
:'[,']>
to indent those lines once. See :help '[
for more examples. And for instance, formatting the code will happen with
'[=']
and formating a chunk of text with
'[gq']
精彩评论