Inserting indentation for columns in Vim

前端 未结 5 923
闹比i
闹比i 2020-12-05 08:24

Using Vim I\'m really a fan of the visual mode that allows you to insert text before a column.

Insert some spacing after the arrows,

> one
> tw         


        
5条回答
  •  醉酒成梦
    2020-12-05 08:50

    Without plugin and if you have already entered your comments without emix's solution:

    :,+2 s/--/                                    &
    

    This will ensure all comments are to be shifted leftwise in order to align them properly.

    Then blockwise select the column to which you want to align the text, and : 100<

提交回复
热议问题