Hacker News new | ask | show | jobs
by sudobash1 5 days ago
For the last example given in that article:

    /test_.*_errors/;/errors
I find it much easier to use "\zs". That tells vim where you want the "start" of the match to be. Everything before the "\zs" is just treated like context:

    /test_.*_\zserrors
It is also useful for ":s/match/sub"
1 comments

Noice! :-D Never knew about that (even though it might be vim-specific), but yeah, so much easier than where I'll usually have to do some trial + error to get my cursor to land where I want it. (usually in a macro, or multi-`.` edit context).