Unable to match one or more whitespaces in Vim

前端 未结 9 721
一个人的身影
一个人的身影 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:44

    Spaces at the beginning of the line in Vim:

    /^  *
    

    That's:

    • '/' for search.
    • '^' for start of line.
    • ' ' for at least one space.
    • ' *' for zero or more spaces after that.

提交回复
热议问题