vi batch line indent and retracted

Method a: Visual mode is achieved by

命令模式下按V(可视模式)或Shift+V(可视行模式)打开可视模式
按J或K选中需要缩进的行
按Shift>缩进一个tab
按Shift<缩回一个tab

Method two: line mode to achieve

末行模式输入        行号1,行号2>    后回车
如 :5,10>    则5到10行缩进一个tab
末行模式输入        行号1,行号2<    后回车
如 :5,10<    则5到10行缩回一个tab
Published 21 original articles · won praise 5 · views 10000 +

Guess you like

Origin blog.csdn.net/icodestechnology/article/details/90055566