Closed anacondaq closed 5 years ago
@anacondaqq VS Code also supports multi line search in a file for which you need to enable regex
option and provide eol
characters for line separators. But, I see that in your video it makes much easier to copy multiple lines and search for it just by pasting it and I liked it.
I saw Electron & VSCode source code, and i think my request will be very hard to implement... This is so bad... 😿
This is one of the features I miss the most indeed.
Finding and replacing chunks of text (I mean multiline text) is really useful. Using \n
is not a solution, as you need to make the change the text you have copied before pasting it to the search and replace inputs.
I would therefore really like to get "textareas" instead of "input text" fields for search and replace fields.
I used this feature all the time too: just paste a chunk of code (or data) that you need to search and replace, then iteratively convert it into a regexp (replacing stuff with (.*?)
or other capturing groups) and use the captured groups in the replacement string (also multiline)
@tobia i don't get you, explain. Can you show any illustration?
I have been using this feature in sublime text a lot, really need it in vscode so I don't have to use two text editor.
Will this be implemented soon? I really miss this feature.
I like how Dreamweaver does multiline search. Haven't used Sublime.
Looks like it got lost in the #26498 re-scoping. Originally, that was thought to be precursor for this issue, but then they decided (correctly I believe) to take what was already done (horizontal resize) and split it. But not sure where the vertical aspect of the Find Widget landed. And it is now definitely disconnected from this issue.
@rebornix , could you please look into reviving this issue and perhaps relink it with the proper underlying work/issues? Also, if somebody feels that this issue still needs more clarification or justification, please, let us know too. (All the reporters here, we may be under impression that the problem is "obvious, anybody can see it")
+1 Missing this feature as well!
I found this thread after I failed to understand how to use multiline regex to match what I want. I wanted to delete blocks of the same HTML that was copied and pasted throughout a document. I did not know that Sublime Text has this feature, and after changing to it, finished the operation in no time.
@louy2 this is killer-feature.
I must admit that VS Code searching UI and UX is total disaster in comparison with Sublime Text. One of the most important aspects of text editor takes a lot of time to do trivial things after Sublime Text, not to mention very unpleasant form — little widget, which you will quickly hate if you need to write often there big chunks of texts, which simply do not fit.
And yeap, lack of Search all
button is lackluster too.
Also, would be great to see option to always keep Replace
field expanded. Expanding it takes precious time.
@ArmorDarks
To open Replace field directly in VS Code you can use ctrl-shift-h
I need this feature too. now i have to use Sublime Text 3.
It's not nearly as good as having native support, but I made an extension that partially adds this functionality. https://marketplace.visualstudio.com/items?itemName=axlan.multiline-find-and-replace It lets you either copy multiline selections as regex to use in the normal find widget, or provides hotkeys to do limited multiline find and replace with text selected from the editor.
Also filed https://github.com/Microsoft/vscode/issues/41050 as a simple change that would streamline the regex find behavior for multiline selections.
aww, I was trying all kinds of things to get this to work. Had been loving vscode otherwise, but this is a bit of a problem.
I love many features in VCode, but without this feature can't move from sublime to VSCode... 😭
"without this feature can't move from sublime to VSCode..."
Ended up here looking for how to do multiline search in VS code.
Really missing this feature too
Jetbrains does Multiline search/replace as well and I use it all the time.. I am having to keep an old editor handy just to be able to do this now
Yep the only editor I have handy that I know with multiline replace is Dreamweaver and I would sooner eat tide pods than load that up...
As an alternative for now, I'm using Notepad++ with ToolBucket plugin that contains a multi-line search and replace dialog: http://phdesign.com.au/npptoolbucket/
@rtpHarry please don't get me wrong but there are 10+ editors with multiline replace. Btw.: in my case, it's UltraEdit for 20+ years now
Fair enough, no I don't take you wrong. As a developer I appreciate some things may sound simple but not be simple to implement. At the time I was mid project and it was working an a pure html site that didn't use any templating system so I needed to fix things in many files. Not a common task for me.
Probably didn't word it totally accurately, what I meant was that it was only editor that I knew at the time for the quick job of a search and replace. Downloading and comparing editors would have taken longer than manually doing it so I sucked it up and loaded DW.
I just thought I would throw my voice into the crowd to say that this would have been a useful feature for an actual job not just theoretically.
Agreed, I really miss that.
+1
This feature is very helpful to all coder. I badly miss it. Please add this feature quickly.
+1
+1
@jotajotaramirez @tkovs @opensolution @joaom182 @waldi +1 comments are not very useful - please use the reactions on individual messages instead and leave comments for actual discussion. Otherwise, every subscriber to this issue gets notified about your +1, and it risks someone at VSCode locking the issue.
This is how it was solved in my "old" Editplus. THere is simple textarea type fields. It has also "Regular expression" as you can notice. It would be great to have it in VSCode.
I started using vscode instead of sublime. I really need this feature!!
I use vs code about half year and I still wait that feature. Also please change font family to monospace in the searching row! Non-monospace font makes my eyes bleed. (=
@Aristocr2t Monospace
in search results issue: #5192
Pity to find out VS Code does not support this :(
I've ran into this a few times now as well. Just so I'm not repeating what everyone else has said, I think what makes this even more annoying is the fact that VS Code explicitly forbids you from using \n
in regexes if you're doing Find/Replace in Files (it gives you an error message).
+1 I need this.
Absolutely need. Have been using this feature across multiple files since BBEdit in 2001.
One of a variety of small things I find exasperating to have to do without in VS Code. +1
+1 until now I still open Sublime Text everytime I need to do that
@NoriSte after spending much time with VSCode, I found it very useful and great in so many situations, but every time when need to do searching / replacing I'm forced back to sublime... Darn, installing sublime just for search/replace option it's pretty silly, but no alternatives. Also, a very useful thing in sublime is search results displayed as a text page, which you can scroll down, and via double left click on the text will open a file in the place where the text is found. Super useful feature too.
So, if these 2 will be implemented somewhere in 2020, I will move to VSCode. But as I see how it's going (already almost 2 years old issue) - nobody cares, or have much higher priorities.
@anacondaqq I'm a Sublime lover and I switched to VSCode when I forced myself to do that because the first time I tried it I didn't make the move. IMHO: Sublime beats VSCode in everything as a text editor (performance, search/replace, s/r done directly or via shortcuts and many many other things)... BUT VSCode isn't a text editor, it's a dev environment, it (well) integrates everything you need today to develop (tasks, debug, GIT, super-easy do be extended) and in that it's almost unbeatable. So: congrats to the VSCode team, I'll switch to Sublime every now and then :)
It is also important to realise that software maintainers (as all vscode users are) don't always get to deal with beautiful, well designed code.
There are legacy code chunks we sometimes have to deal with, and they're usually spread among files in the form of duplicate code. The task of identifying and replacing such code is easy as pie with multiline search/replace, and a pain without it. With this feature you can focus on more meaningful, less mechanical work.
This is really the only feature that is keeping me from making the jump from Sublime to VS Code. Please implement it! 🙏🙏🙏
+100
+1
+1
The latest ripgrep
release has multiline search support: https://github.com/BurntSushi/ripgrep/releases/tag/0.10.0.
cc https://github.com/Microsoft/vscode/issues/13155, @roblourens.
I saw that and am very excited about it, but in September we are focusing on reducing bugs and debt: https://github.com/Microsoft/vscode/issues/58224. So I will be working on this in October.
@roblourens good to hear that, that at least after 2 years of the issue it got checked, and will begin development. ping me back somewhere in 2020 when the feature will be ready. Thx
I'm new to VSCode, i like many things in this editor, but i miss a lot of really useful and important options which missing for some reasons at Visual Code. One of such feature is Powerful Search Options.
About what i'm talking about?
What will you see on image above?
Why multiline feature like in sublime text should be implemented?
Because of this feature, time saved in 10-20x times. People like me who working with a lot of patches, reject hunks, etc things and working with a lot of searching things will find this features very useful. Example of usage can be: fixing
.rej
files, applying patches, big diffs, applying some changes to multiple lines at once.Please think about it well, this feature is market-killer, and in one day even if you reject the issue today, community will request this feature for sure, no exeptions, just time will show. Because this feature minimize stupid tasks and time for doing the same job, productivty increased, all happy.
More info about feature: http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace.html