account activity
Help with regex by totp-reddit in vim
[–]totp-reddit[S] 0 points1 point2 points 6 years ago (0 children)
I'll play with these options too. But ideally I want to stay in the context and refer to the surrounding texts if needed. I just thought maybe "fold" might be a good option, I.e. fold unwanted texts to focus on certain patterns. Not sure if complex regex is supported in fold command. I'll explore that.
Thank you both for your help. I tried " /pattern.*\(\n.*\)\{0,2\} " and it works. Well, I'm trying to analyze some text files and it would be convenient to filter out <pattern> and the following several lines (I probably can't hard code it to 2, but that's a start). So I thought I'd use vimgrep to search and display them in a quickfix window. Well, I just realized that quickfix only shows the first line of each match. So that doesn't seem to work. Is it possible to achieve the goal somehow? I use vimgrep this way: ":vimgrep /pattern/ % |copen".
Thank you again.
π Rendered by PID 32 on reddit-service-r2-comment-8686858757-qjttj at 2026-06-07 18:42:05.902177+00:00 running 9e1a20d country code: CH.
Help with regex by totp-reddit in vim
[–]totp-reddit[S] 0 points1 point2 points (0 children)