The current editor I have open contains the name of a file or part of the name of a file that I have in my workspace. I want to search for that file by selecting the text of that name from the editor, and then putting that text in the Quick Open search box. Currently, I need to manually copy and paste the text, but I want to have behaviour similar to the cmd + F search box where the selected text from the editor immediately appears in the search bar when it is opened. Is it possible to configure Quick Open to do this as well? Or maybe there is an extension for this?
At the time of this writing, this is currently not configurable.
If you look in the settings, all the settings that allow enabling or disabling this behaviour contain the word "seed" in them: search.seedOnFocus, search.seedWithNearestWord, editor.find.seedSearchStringFromSelection. From my reading/searching, there is no other setting with the word "seed" in it.
I googled "github vscode issues quickopen seed" and found this GitHub feature-request on the VS Code GitHub repo: Fuzzy quick open should use selected text as a starting point #59957 asking for such behaviour to be the default behaviour. The issue didn't get enough support from other users to get added to their backlog (a feature request needs to get a certain number of thumbs up reactions from users within a certain time period after it is created to get considered for implementation), so that feature-request is now closed.
If you want to get such a configuration option, create a feature-request issue ticket. If you want to increase your feature-request's visibility (and therefore its chance of getting enough user support), share a link to it on various programming platforms such as r/vscode.
I didn't find any extensions that do this by googling "vscode marketplace quick open seed" and looking at the top results, but maybe you'll have better luck with different queries.
I want to use vscode instead of notepad. I prefer to type as fast as possible when launching vscode but i can't seem to find this option to do this. Does anyone know what this option is named after or if it's possible with a plugin?
This can by making a small tweak in vscode settings. All you need to do is open preferences and search for Startup editor. Under the Workbench section you'll find the Workbench: Startup Editor option. Change the value of this option to newUntitledFile.
Thanks to Torge Rosendahl whose comment provided the answer:
The setting you are looking for is workbench.startupEditor
I find Github Copilot very helpful in some specific situations, but fairly unhelpful in its verbosity in most situations.
By default, it's always on, always suggesting (and frequently getting in my way.) I want it to be less aggressive, disabling the auto-suggestion, but still have it readily available at a keystroke.
What I've tried already:
In a helpful post, I see that Alt\ is the default key for triggering Copilot suggestions. Great, that's half of the solution.
In settings.json, setting the following seems to disable copilot entirely! It is no longer available using the keyboard shortcut.
"github.copilot.inlineSuggest.enable": false
I wonder if that's a bug, because there's already multiple ways to disable copilot entirely.
In settings.json (under File, Preferences, Settings), I found that setting the more general option:
"editor.inlineSuggest.enabled": false,
Seems to work as I'd hoped. Copilot suggestions are now only provided on-demand, when I press Alt\, and accepted when I press Tab
I worry that this might disable other types of suggestions I rely on... but language auto-completion still seems to work. I'll update this answer if I find anything I miss.
BTW, changing the keyboard shortcuts:
Under File, Preferences, Keyboard Shortcuts, if you search for inlinesuggest, you see the keystrokes for both triggering inline suggestion and for committing (aka, accepting) inline suggestions. Double-click the row to change the key (but watch out for conflicts.)
For Jetbrains IDE (e.g. Webstorm).
You can uncheck automatically show completions in the IDE's settings (Settings > Languages & Frameworks > GitHub Copilot).
and then still TRIGGER completion with a keystroke Alt+\ or any keymap you are comfortable with (Settings > Keymap > "Copilot" in the search bar):
Pressing tab each time you want to automcomplete seems time-consuming. Ideally, you just type in the first couple of letters and you get a drop down list without pressing tab.
In Jupyter notebook, there were some extensions that you could install to get this functionality. https://github.com/ipython-contrib/jupyter_contrib_nbextensions
Is it possible to get this on JupyterLab?
Thanks
The jupyterlab-lsp extension offers this as an opt-in feature. After installing the extension in JupyterLab 3.0+ (which is two part: jupyterlab-lsp and the language server of your choice - see the linked instructions) you need to enable it in Advanced Settings Editor → Code Completion → continuousHinting:
Disclaimer: I am one of the authors. This feature is still under development.
I am using Visual Studio Code 1.31.1 in MacOS 10.13.6. I open VSCode, I open a folder of text files, and I press command-option-F, or use Edit -> Find in Files. I search for a string that I know for sure exists in multiple text files in the open folder, and it says it can't find it.
Searching across files works if I have the folder open and have each and every single file open as a tab, which is rather pointless. Is there a way to search across files without actually having them all open as tabs?
I think it was because I opened a folder on Google Drive File Stream. It works fine on local files.
In my case, this was caused by me accidentally toggling the "Search only in Open Editors" option.
Had this same issue, the search functionality was only working for files that were open in the editor. My issue was that VS Code had an update downloaded and ready to update, so I just restarted VS Code, let the update finish and the issue was gone.
It could be that the search is looking into all folders (including node_modules ones), so as it is too big, the search never ends
To fix that, you can list all folders that you want to exclude of the search, to do that, open your vscode settings (ctrl + ,) type "Search: Exclude" in the search box and add your folders. (Btw some are already added by default)
Besides, remember to enable that filter in your search, this is simple, just toggle on the gear button in your search section
If you are still not sure about what to do, take a look in this briefly gif
Had the same issue on Mac, seems like it was related to Google Drive. once I moved the files on my local drive the search worked fine.
Check out your vs code settings. It excludes some folders by default e.g. node modules.
Go to settings, search "Search" , there will be list to exclude folders.
Remove item which might be accidentally got included, which might causing search item in all directory is not working.
I had this problem today. Turns out I had a deprecated setting for advanced RegEx searches "search.usePCRE2": true, Once removed, search started working as expected.
I just had this problem on VS Code 1.58.2 / Mac OS 10.15.7
None of the above solutions worked for me, it still keeps saying 'No results found in open editors' no matter what I do.
But I did get it working by changing the 'Search: Mode' in the settings (for the workspace, or any other scope if needed) from 'view' to 'reuseEditor'.
Yes, this doesn't fix it if you really want the results in the Explorer tab rather than a completely new editor window, but it works.
I had the same issue, i fixed mine by removing files in .gitignore
I had an issue with searching in a project with git submodules and found that the gitlens add-on defaults to ignore searching any submodules:
Setting this to 2 or more may address your problem.
In my case, I had somehow gotten my Explorer set on a subfolder of my project. Closing VS Code and reopening the workspace reset everything and search worked again.
In my case, it was files with no extensions I was not able to find. Once I added those files an extension, I was able to find them via the search feature.
I initially wrote this answer describing a confusing "inverted" behavior of the Search only in Open Editors option/button.
However, after playing around it turns out that what the GUI was showing was not "in sync" with what the search results were returning. Toggling the options a few times appears to have fixed things.
So if your search doesn't appear to be returning any results, I would suggest toggling the Search only in Open Editors and Use Exclude Settings and Ignored Files options.
Otherwise, for information, here is my previous answer:
VS Code has an extremely confusing "inverted" interface when it comes to the option Search only in Open Editors.
There is also another option which affects how search works in a confusing way: Use Exclude Settings and Ignored Files.
The below screenshot shows both:
Note that:
Search only in Open Editors is OFF
Use Exclude Settings and Ignored Files is ON
With these options I get search results back, with them set the other way around - confusingly - I get nothing.
Important to note:
If you turn Use Exclude Settings and Ignored Files OFF, then VS Code seems to stop searching any files, EXCEPT for those which are currently open in tabs. This is very confusing and not the behavior one would expect. The expected behavior would probably be to search the whole opened Folder/Workspace by default.
If you turn Search only in Open Editors OFF, then only open editors will be searched. This is the "inverted" behavior. My current build of VS Code has the indicator "inverted" for this GUI element. When it looks like it is in the "ON" state, it is actually "OFF". When it looks like it is in the "OFF" state, it is actually "ON'.
These two things interact in unexpected ways: (This is the behaviour I observed after toggling both buttons a few times. It is different to what I was seeing a few minutes ago.)
Open Editors (looks like) it is OFF, Use Exclude Settings (looks like) it is ON, search appears to search whole workspace.
Open Editors (looks like) it is OFF, Use Exclude Settings (looks like) it is OFF, search appears to search open tabs only.
Open Editors (looks like) it is ON, Use Exclude Settings (looks like) it is OFF, search appears to search whole workspace.
Open Editors (looks like) it is ON, Use Exclude Settings (looks like) it is ON, search appears to search whole workspace.
I suspect that when typing / editing the search terms, replace option, and files to include/exclude options, VS Code does not check the state of the option buttons before performing the search. This is likely the source of the bug I was seeing earlier.