4 ms·
Another slew of utility lies in `:help searchoffset`, often like the following: https://til.codeinthehole.com/posts/about-vims-semicolon-search-offset/ https://
by ramses0 3mo ago
Another slew of utility lies in `:help searchoffset`, often like the following: https://til.codeinthehole.com/posts/about-vims-semicolon-search-offset/ https://til.codeinthehole.com/posts/about-vims-semicolon-sea...
/x/e-3
/x/+1
/x/;/yz
...it allows near arbitrary cursor placement (eg: this blog articles "squiggle" situation) to be able to find the beginning of the squiggle, or the end of the squiggle (or temporarily using "X" and "Z" for start/end, and "clearing" it with `V...:s/[XY]/./g`
- JSR_FDED 3mo agoLove it, this was new to me
- ramses0 3mo agoIt's one of those things you'd _never_ stumble over naturally, but once you're aware of the concept, it makes a ton of sense and you can immediately think of tons of uses for it. /def new_.*(/s+8 /2026-/e /except/+1;/raise
- sudobash1 3mo agoFor 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"
- ramses0 3mo agoNoice! :-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).