KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I saw other questions dealing with the finding the n-th occurrence of a word/pattern, but I couldn't find how you would actually substitute the n-th occurrence of a pattern in vim. There's the obvious way of hard coding all the occurrences like :s/.*\(word\).*\(word\).*\(word\).*/.*\1.*\2.*newWord.*/g Is there a better way of doing this?
Tags (comma-separated)
Save Edits
Cancel