今天,我不得不对齐表格的一行只有第一多个空格。
Today I had to align a table at only the first multiple spaces on a line.
体育教育。
<ScrollWheelDown> move window three lines down
<S-ScrollWheelDown> move window one page down
<ScrollWheelUp> move window three lines up
<S-ScrollWheelUp> move window one page up
我用表格插件来调整表,但我不能找到一种方法如何找到多个空格,只有第一次出现,做一个对齐只有在那里。
I use Tabular plugin to align tables but I could not find a way how to find only the first occurrence of multiple spaces and do an align only there.
我不知道它无论是在VIM: 将正则表达式如果我只是想找到一个线路上的图案第三发生? 是正则表达式与使用表格?
I don't know it either in VIM: What will be the regex if I only want to find the 3rd occurrence of a pattern on a line? Is the regex the same as using Tabular?
正则表达式是:
/\(.\{-}\zsPATTERN\)\{3}
所以,如果,例如,要在3'富'更改为'巴'以下行:
So if, for example, you want to change the 3rd 'foo' to 'bar' on the following line:
lorem ifoopsum foo lor foor ipsum foo dolor foo
^1 ^2 ^3 ^4 ^5
运行:
s/\(.\{-}\zsfoo\)\{3}/bar/
获得:
lorem ifoopsum foo lor barr ipsum foo dolor foo
^1 ^2 ^3=bar ^4 ^5
上一篇:堆叠的div从底部到顶部div