You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] Place Multi-Cursor before every search result #81407
feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiessearchSearch widget and operation issuesverification-neededVerification of issue is requestedverifiedVerification succeeded
It would be awesome to easily place a cursor in front of every search result. This could be done via a right click menu. A bonus would be to do this with all search results or with all search results within a file or folder. Extra bonus, if there would be a keyboard shortcut for this.
Disclaimer:
I know there is ⇧⌘L, but that requires me to switch the windows all the time when I'm done with one file.
If your search term exists in 2 folder then do you want to put multiple cursors in both the files?
A bonus would be to do this with all search results or with all search results within a file or folder. Extra bonus, if there would be a keyboard shortcut for this.
If yes, is it possible to put multi cursor in different files? roblourens
So, if the search term exists in multiple files/folders, and I press the shortcut for that, then yes, I would want to place multiple cursors in all the files.
Since you can only edit one editor at a time, I think it's not useful to add cursors to different files. The way I imagine this working is a keyboard shortcut that is only active when you have a file row selected in the search results, and when activated, it adds cursors to all results in that file.
The way I imagine this working is a keyboard shortcut that is only active when you have a file row selected in the search results, and when activated, it adds cursors to all results in that file.
And you will have to get all the results of the selected FileMatch and add cursors to their positions after opening the editor. I'm not sure how to add multiple cursors off the top of my head. But here is where we open the editor:
feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiessearchSearch widget and operation issuesverification-neededVerification of issue is requestedverifiedVerification succeeded
Activity
roblourens commentedon Sep 26, 2019
This is like
alt+enterin the find widget. Could work with the same shortcut on the search viewlet. I think it sounds useful.njkevlani commentedon Oct 7, 2019
Dominik Ritter (@dritter)
If your search term exists in 2 folder then do you want to put multiple cursors in both the files?
If yes, is it possible to put multi cursor in different files? roblourens
dritter commentedon Oct 8, 2019
Nilesh Kevlani (@njkevlani) I imagine that feature on multiple layers (switchable through shortcuts):
So, if the search term exists in multiple files/folders, and I press the shortcut for that, then yes, I would want to place multiple cursors in all the files.
roblourens commentedon Oct 8, 2019
Since you can only edit one editor at a time, I think it's not useful to add cursors to different files. The way I imagine this working is a keyboard shortcut that is only active when you have a file row selected in the search results, and when activated, it adds cursors to all results in that file.
njkevlani commentedon Oct 9, 2019
Let me know if this is enough Dominik Ritter (@dritter)
I would be happy to implement this if we need to add this feature. Let me know if I can take it up roblourens
And some code pointer will be really appreciated! :)
roblourens commentedon Oct 9, 2019
Sure, go for it :)
You will have to add a command that can be triggered with a keyboard shortcut. Some other search commands are registered here:
vscode/src/vs/workbench/contrib/search/browser/search.contribution.ts
Line 95 in ab0eb6d
And you will have to get all the results of the selected FileMatch and add cursors to their positions after opening the editor. I'm not sure how to add multiple cursors off the top of my head. But here is where we open the editor:
vscode/src/vs/workbench/contrib/search/browser/searchView.ts
Line 1519 in ab0eb6d