linux - Vim, find the n'th occurence of a word -


i tried using following syntax, in vim find n'th occurence of word(i replace word one)

:6:myword  

and replace newword

i not understand getting wrong, can me?

s/\%(\(myword\).\{-}\)\{6}\zs\1/newword/            ^             ^             ^             pattern       occurrence    replace pattern 

it replace 6th occurrence of myword newword.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -