Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Huh. I forgot about %s. I just search for a pattern and replace the first one manually. If there are fewer than ~5 occurrences, I'll just hit `n.` ~5 times and get them all. If there are more, I'll record a macro with `qqn.q`, then look at the occurence count in the bottom right corner (e.g. 50) and hit `50@q` to get them all. Sometimes the replacement text is non-constant, and this method allows for more flexibility with the recorded macro.

Sometimes it's funny to look around and see the strange local minimum of effort you've settled into.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: