-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Better UI for Multiline Search & Replace in a single file #15727
Comments
@Anacondaqq VS Code also supports multi line search in a file for which you need to enable |
I saw Electron & VSCode source code, and i think my request will be very hard to implement... |
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 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 |
@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? |
+1 |
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 Also, would be great to see option to always keep |
@ArmorDarks |
@lehni Please open a new issue rather than adding new discussion to an old issue with 50 people subscribed. |
I want to point out that I can do the following in Atom:
Then I hit I don't need fancy dragging and live selection and stuff. I'm sure that's useful, and I have nothing against it. I'm just saying this simple capability would make search so much better and fix a large part of this defect. But it looks like someone already closed #47400 for whatever reason. 😦 |
@garretwilson Thats exactly what we need in vscode |
I greatly prefer the search bar in Sublime Text to that in Visual Studio Code:
Because the Visual Studio Code search bar covers partial lines of code, and is the same background colour, I find it particularly difficult to read |
I don't get it. VS Code is so great, yet when I need to remove a few I seriously cannot figure out how to do a multi-line search and replace in VS Code.
As I mention above, in Atom (before I switched to VS Code) I just:
Then I hit Maybe I'm being dense and missing something simple. Is there a way I can simply select a block of text, and say, "Hey, VS Code, this is what I want to search for; I'll tell you what to replace it with." Can I do that? If not… why not? |
@garretwilson What version of vscode do you have? This feature has been added in November 2018 (see https://code.visualstudio.com/updates/v1_30#_multiline-search-input). For me it works great:
I think that this issue should be closed as it is done. Thank you vscode for adding this! |
@JakubRimal Oh! I didn't know that!!! Thanks. |
That's a definite step forward, but it would be nice to have that in file search, not only project-wide. If you want to do a multi-line find and replace on just one file, this isn't so convenient (thought workable). Hopefully translating the fix from project search to file search shouldn't be a great leap, and it would be an incremental UX improvement that is worth having. |
But isn't that for multifile search+replace? I just have a single file open. @JakubRimal , how do a do a multiple search+replace just inside the single file I have open? |
@DisasterMan78 @garretwilson You can do it using "files to include" field (Ctrl + Shift + Alt + C to copy a relative path of the current file). But you are right, I missed that the original question is also about a single file (but the question description mention "multiple documents" as well). |
So how do we get more visibility for this ticket and raise the priority of this? Any ideas? |
It looks like this is assigned to @rebornix and @misolori . Maybe one of them can give us an update and a timeline for getting this done. |
@garretwilson I always use multi cursor selection for that. It's by far better than every search functionality, as soon as you're getting used to it. Just select the part you want to "search" for and then press Train the above techniques, until you have them in your muscle memory, then it'll save you a lot of hassle. There are even more things you can do with the multi cursor selection that you should definitely learn: https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_multi-cursor-selection |
Wow, @mamiu , that is a great workaround, thanks so much for telling me about it. It turns out that after making the selection using Still, it's a little tedious and isn't an excuse for the VS Code team not to implement a decent multiline search+replace for a single file. But this will help greatly for now. Thanks again. |
@ArmorDarks you can resize the find widget by dragging the left most sash when necessary. |
@rebornix Is this something you have to enable? I tried to do this, but it remains single line for me. |
Like Russian saying: "the promised three years are waiting". |
@anacondaq Glad to hear that you're happy now! Then please close the ticket. |
Closing this issue as we shipped multiple line find and replace support. |
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
The text was updated successfully, but these errors were encountered: