How to find the 3rd occurrence of a pattern on a line

后端 未结 4 2208
囚心锁ツ
囚心锁ツ 2020-12-05 15:10

Today I had to align a table at only the first multiple spaces on a line.

p.e.

    move window     three lines     down  
<         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-05 15:27

    Try this:

    :Tabularize /^.\{-}\S\s\{2,}
    

    Yes, Tabularize uses Vim's regex, so the example on Eelvex's answer should work.

提交回复
热议问题