microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
158.93k stars 27.8k forks source link

Display search results in a tab instead of the side bar #23931

Closed rfgamaral closed 4 years ago

rfgamaral commented 7 years ago

I was talking to a colleague the other day and the only reason he's not using VS Code is because of how the search is implemented in VS Code and I have to agree with his opinion.

Both Sublime Text (which I'm used to) and Atom (the editor my colleague is using) feature a search tab. A search tab displays the results much more clearly given that there's much more space available to display them. Instead, VS Code displays them in a "small" side bar.

Yes, we can resize back and forth the side bar, but that's a bit annoying. It would be nice to have the search results displayed in a new tab similar to Sublime Text and Atom.

d-akara commented 7 years ago

I prefer the functionality of VS Code over sublimes implementation. I don't use sublime much, so maybe this is configurable; however, these are the limitations.

  1. I can't simply cursor down over each match and have the file opened as I cursor down
  2. It is harder to see just all the matches due to so much extra formatting and context around the matches
  3. I often want to hide the side panel, but then go back to the last results again. Not sure how smoothly that will work from another document.

A wider display however could be useful. For example displaying in bottom panel instead of side panel. Also, ability to capture the text of results would certainly be useful. #17920

roblourens commented 7 years ago

I know this has had some discussion before but can't find the issue right now. I've been toying with the idea of a button to dump the results from the viewlet into a sublime-style editor view, which would solve a few problems at once. Not sure how great that experience would be.

d-akara commented 7 years ago

@roblourens I can imagine lots of people have different ideas of how the contents of the dump should look. Would it be difficult to provide an API so that we could write extensions to do something with the results?

rfgamaral commented 7 years ago

Those are all valid points @dakaraphi :)

My only reasoning for this was the wider display to show the results. Currently it's cumbersome to go through the results (especially when there are many of them) because the sidebar, as a component, is narrow by default.

d-akara commented 7 years ago

@rfgamaral Thanks for clarifying. In this case, you might be interested following this item #2806

FezVrasta commented 6 years ago

I would love to have the search results shown on the bottom tabs where there's also "terminal" "output" and so on.

is it possible?

maxekman commented 6 years ago

IMO, all three options would be nice to have; in the sidebar, as a tab/buffer or in the console area.

bhat-ganesh commented 6 years ago

Is this feature supported yet?

leocaseiro commented 6 years ago

Isn't duplicated of #9435?

3zzy commented 6 years ago

+1 I really love the way Sublime displays the search results so you get a the overview without opening each file. I'll switch to VS Code once it has this.

shobhitg commented 6 years ago

I recently moved to VSCode. As a sublime user, while I feel at home, but Search UX is just not very good. I would love to see search results in wider bottom panel, which I can expand to full tab whenever I wish.

fatihacet commented 6 years ago

A huge 👍 to this issue. As a long time Sublime Text user, this is the deal breaker functionality. I often find myself resizing the search pane back and forth. Also lack of context in the VSCode search is another big thing. It makes very hard to find what you are looking for if you search something common in the codebase. Assume that you are new to the codebase, this is real pain in the ass.

Another fun fact is, Sublime or Atom version of displaying search results also allows you to search in the search results which is really handy.

Hope this feature lands in the VSCode sooner than later.

mikegreiling commented 6 years ago

likewise, I prefer to have more horizontal space to view search results 🙏

pxwee5 commented 6 years ago

Drop the search icon from the sidebar and just follow Atom's search UI.

shobhitg commented 6 years ago

Another fun fact is, Sublime or Atom version of displaying search results also allows you to search in the search results which is really handy.

This. Another thing that is very important.

I hope whenever the search's re-layout work done, this search within search results functionality is taken care of as well.

adamreisnz commented 6 years ago

I was talking to a colleague the other day and the only reason he's not using VS Code is because of how the search is implemented in VS Code

I'm so glad I'm not the only one. I'd really like to switch to vs code, as Atom is getting way too slow. But when I first tried to search in files and saw how the results were cramped inside the SIDE bar, I didn't know how fast to switch back after discovering that my only option was to make the sidebar wider manually, which also made it wider for the file explorer.

If vs code could copy a thing or two from Atom's UX it'd be a great editor, this is one of those things.

notrealdev commented 6 years ago

Display search results in a tab instead of the side bar please, like Sublime text

mshirlaw commented 6 years ago

This is the one reason I have yet to switch to vscode. I've tried to make the switch multiple times but I need to see more context about the search results without having to continuously resize the LHS panel. Would be very greatful if this was user configurable at some point in the future.

andrewdang17 commented 6 years ago

At the very least, the sidebar with search results should expand. I find myself resizing it to view the results, then resizing it back down.

shirazz commented 6 years ago

After using VSCode for a week, this is the only thing which is pulling me back to sublime. Really the search should be improved.

ghost commented 6 years ago

The VSCode search panel really need to be improved. It can't config the position and result displaying is too narrow.

aneilbaboo commented 6 years ago

Not being able to view search results and the explorer at the same time drives me crazy.

ahmedkapasi commented 6 years ago

Not being able to view search results and the explorer at the same time drives me crazy. I agree @aneilbaboo.

Search functionality and the color/font theme of the files listed in search in VS Code is the only factor stopping me to switch from Sublime, please change it and make it similar or better than Sublime.

eyaleizenberg commented 6 years ago

Any news on this?

adamreisnz commented 6 years ago

If I were developing an app to compete with very popular editors like Atom and Sublime, I would make sure that it at least takes all the good things and does them the same or better.

If 150+ people vote for a particular feature and tell me it's missing and that they're waiting to switch because of it, I'd be damn sure to prioritise that issue.

In reality there's probably 15,000 people who are can't be bothered to report the issue but feel the same way. It is still the only reason I'm not using VSCode to date...

eyaleizenberg commented 6 years ago

Is there an API for it? If there is I don't mind developing it.

andrewzey commented 6 years ago

Definitely agree on this 100%. The extra horizontal space, as well as the ability to search within search results is a big deal. So far, very happy coming from Sublime and Atom, but the Search UX in VS Code is currently quite lacking.

notrealdev commented 6 years ago

Hi @roblourens , 9 months have passed, any new?

geosmall commented 6 years ago

+1 on this. I'm still using Sublime because the search just works compared to VSC. Please prioritize search results in tab as with Sublime including search on search results. To anyone using both it is quite obvious change is needed as a priority. VSC does so many things very well but then lets itself down with lack of essential find in files functionality.

aneilbaboo commented 6 years ago

@chrmarti @roblourens - Could we escalate this?

isidorn commented 6 years ago

We have started to investigate into this one https://github.com/Microsoft/vscode/issues/9435 More specificaly, exploring how to adress the lack of horizontal space in search. I feel this item is more general, thus it remains in the backlog for now.

andreisoare commented 6 years ago

Another use case for opening in a new tab is allowing to search multiple things at once and switching back and forth between the results. This is very useful when doing big refactors.

goelrohan6 commented 6 years ago

I recently shifted to vscode, and I have to use sublime when I perform a global search. When the search results are opened in new tab It not only shows the required results but some code above and below, after which I can perform a search inside search results. would love to have the same in vscode.

doberkofler commented 6 years ago

I completely agree and at least for me this is the only reason I'm not yet willing to switch from Sublime Text to VS Code. Searching and replacing is one of the most important features in a code editor and really needs:

aneilbaboo commented 6 years ago

See https://github.com/Microsoft/vscode/pull/43833

Just set this in settings:

 "search.location": "panel",
doberkofler commented 6 years ago

@aneilbaboo This does alleviate the problem when displaying the search results, but the pane is still far to small and cluttered. Additionally I would have to open and close the pane on and off instead of just having the results ready in a separate tab.

leob commented 6 years ago

@aneilbaboo Thanks, this is brillant, almost a perfect solution ... the default location (side bar) is way too cramped, moving it to the panel makes it definitely workable.

Next problem is that I want an easy way to close the search panel when I'm done with it, so my next step was to define a keyboard shortcut for "close panel" (this is apparently not the same as "close editor", ctrl-w or cmd-w).

I like VSCode but this is one of the (seemlngly small but important) annoyances that would keep me from calling it my favorite IDE, yet ... however step by step I'm getting there.

Tip (regarding the search dialog): with the "alt-up" and "alt-down" keys you can cycle through your search history. This is a feature which I like a lot in my other IDEs (Eclipse, Netbeans, Webstorm) and which I thought was missing but it's there, just a bit hidden.

geosmall commented 6 years ago

@aneilbaboo, @isidorn Thanks, much better. Alas results continue to be cluttered, hard to scan quickly. Results will ultimately need a separate tab. reference Sublime Text implementation. No need for reinvention, the approach works. Last piece missing from me moving over to VSCode, can't wait!

pxwee5 commented 6 years ago

@aneilbaboo Thanks for highlighting the new feature. @isidorn Thanks for developing it. [Feature Request] Pressing ESC should trigger a close on both the panel search result.

doxomo commented 6 years ago

@pxwee5 use cmd+j

chibicode commented 5 years ago

"search.location": "panel" is great. If space is too small, try utilizing View: Toggle Maximized Panel.

svipas commented 5 years ago

Any news? Because this is OP feature, like Atom or Sublime have. Because in panel there's no much space for height and it's hard to see if list is long ALSO it's way better to have option to move it to separate tab. I suggest to create option like: "search.location": "tab"

/cc @roblourens

leob commented 5 years ago

"search.location": "panel" is a big improvement, however the experience is still more clumsy than the project search dialogs offered by IDEs like Eclipse or Webstorm ... but it's workable

derek commented 5 years ago

@pxwee5 Agreed. In the meantime, adding the following snippet to keybindings.json will close the search window upon an ESC press when it that panel is visible.

{
    "key": "escape",
    "command": "workbench.action.togglePanel",
    "when": "searchViewletVisible"
},
Meliovation commented 5 years ago

Funny, I have gotten used to the search results in the sidebar and prefer it! Since the source files are listed in the sidebar, displaying the search results there is a more relevant fit in my opinion. I found this issue in order to figure out how to turn it back as the latest update seemed to set the new setting default value to panel. Glad there are options for us all :)

leob commented 5 years ago

Problem with the sidebar is it's way too cramped and narrow! But if it works for you, then by all means ... good indeed that there are choices. The fact that VSCode is so configurable is one of the things I like about it (the other thing is that it's lightweight).

davidnorthetal commented 5 years ago

Have to agree here, the search result ought to be in a tab or at the bottom via vertical-split in my setup and I miss this at great length.

I think adding an option for that should be on the list.

EDIT: Oh it seems there's already "search.location": "panel" which seems to be what I want.

JamieMason commented 5 years ago

I'm looking for to create a feature request for the Sublime Text behaviour of find where the results show in an Editor Tab the same as regular plain text files – I'm not entirely sure whether that's the same as this request? Is this request asking for them to just display in a bigger area but everything else to be the same? Or does this also cover the results being editable?

doberkofler commented 5 years ago

My key issue are:

ghost commented 5 years ago

After set search.location" to "panel", the search icon in left side bar was disappear. I think it should be fixed.