Unable to match one or more whitespaces in Vim

前端 未结 9 695
一个人的身影
一个人的身影 2020-12-28 11:55

I want match spaces at the beginning of lines in Vim

PseudoCode of what I want to do

^( )*

I know the following fr

9条回答
  •  甜味超标
    2020-12-28 12:31

    Typing

    /^ \+
    

    In command mode will match one or more space characters at the beginning of a line.

    Typing

    /^\s\+
    

    In command mode will match one or more whitespace characters (tabs etc. as well as spaces) at the beginning of a line.

提交回复
热议问题