-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support multiline search #20
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
it have some problem to use vim matchstr to highlight sample |
Is this a wont-fix? |
Any updates on this? This is one of the few reasons where I find myself opening VSCode 😅 |
Have to admit, in the ocassions needed (like now for me 😆), this will be really useful. |
with #17 it motivates me to use another replace tool or write own. Will look to it |
I don't want to fire up VSCode for changes like these 😃 Any solutions? Doesn't have to be in spectre, sed is fine too. Sometimes I want to remove file owner comments bulk, something like this (note the new line after the comment):
With sed I could remove the first line:
But I can't remove the extra newline after. I tried to get answers from ChatGPT, but it always ended up removing more lines than I initially wanted. |
Hi, Found myself in the same situation, not being able to also replace the '\n' at the end of the string to not replace with an empty line force me to use another tool than Spectre 😭 |
care to share? |
In python, you can add inline flag with (?m) - multiline, (?i) - ignorecase and so on. I would LOVE to see this! The fact that there is no Multiline search is terrifying :( |
In my case I was removing items from a YAML list, I ended up crafting a small Python script and the replacement at scale |
support multiline search
problem
if we add this to rg search option we can search across multi line with \n but it have wrong total result because we read everyline and map it to a result
the highlight is not correct too because we use vim to highlight vim doesn't support
\n
. It only read 1 line to highlightsed is not support replace with range on multiple line. I use sed because it use a same syntax of vim and vim group name replace. but it will broken on multiple
https://github.com/microsoft/vscode/blob/b385fa7ceb2b537e0ba2b58edaa162f4e299a947/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts
current solution is search 1 line and use quickfix to run macro
cdo
😄The text was updated successfully, but these errors were encountered: