How can I set the default option in Visual Studio Code's Quick Open View? - visual-studio-code

Up until now I've been using Ctrl+Q to trigger View: Quick Open View. The first option was Explorer, so if I Ctrl+Shift+F to search something I return the Explorer back to the sidebar by Ctrl+Q only.
Today, the first option changed and I have no idea why. It's set to an extension's sidebar view.
If I disable it the first option becomes Bookmarks. How can I tell VS Code I want Explorer to be the first option, like it's always been?

See https://github.com/microsoft/vscode/issues/90232
It was a regression in v1.42 that is due to be fixed in the v1.42.1 recovery update.

Related

New to VSCode, can't disable sidebar

I am new to VSCode, long been a holdout with Powershell ISE. I am in a situation where I am doing more with PS7, so have no choice but to use it. The one thing that I cannot seem to find is a way to permanently disable the sidebar. Every time I run a script the stupid thing pops up, and I have to hit CTRL+B to close it. I have tried going into Powershell language specific settings, but the only option I see is sidebar.location.
Is there any way to permanently stop this from popping up?
Here is the solution:
go to settings
search for Debug: Open Debug
choose never open
Allow me just say this. I too use VSCode, Sapien's PS Studio, and the ISE more than the previous two, but also use PowerShell v7.
So, FYI... You do have a choice, You can use PowerShell v7 from the ISE. I do this every day. Well, it's a workaround to do so, but it works just fine.
Here is one of the ways to use PowerShell v7 in the ISE.
Using PowerShell Core 6 and 7 in the Windows PowerShell ISE
The other way I use it is just shelling/branching out to it as needed.
Yet, your question is really a duplicate of this Q&A.
Is there a shortcut to hide the sidebar in Visual Studio Code?
And these potential answers...
you can hide the activity bar by setting up your own keybinding
(code.visualstudio.com/docs/customization/keybindings) for
workbench.action.toggleActivityBarVisibility
and or
In the VS code version 1.43, you can hide or show the side menu or
activity bar by going under the 'VIEW' tab in the nav bar in the top
margin of VS CODE(called the 'Menu Bar'). Go to View => Appearance,
there you can check or uncheck different nav bars to show/hide each
one.
If you have the top bar (Menu Bar) currently hidden press 'alt' key to
bring it back then follow above instructions to check it to keep it
there permanently if desired.
The thing to remember though is, that sidebar is your file/project explorer and as such critical for normal development. It's how you get to all your files. Sure, you can still get to them using F1 and type a name, but that's kind of painful, vs scrolling to find what you need or opening multiple files in a project at once.

Tab key is not working in visual studio code

Tab key is not working for abbreviation in visual studio code.I have tried lot.How can I fix the problem?I am frustrated.Thinking of using Bracket instead of visual studio code.
In my case
Using (Ctrl + M) return Tab button to its normal working status.
I think you may be asking about this setting:
// Insert snippets when their prefix matches. Works best when
'quickSuggestions' aren't enabled.
"editor.tabCompletion": true,
That is set to false by default, change it to true.
Don't change any keyboard shortcut or something else. You should change the language mod right bottom on the editor. It was selected javascript by default. You should change with Javascript React after that this changes all emmets suggestions is working.
For Visual Studio code version 1.33, go to File > Preferences > Settings Search for tabcompletion and by default it is off, select on, that is it, you are done.
Pressing Ctrl+M did not disable the mode for me, however the right side of the bar along the bottom of vs-code shows Tab Moves Focus as enabled, which you can click to disable.

How to open files in new tabs in Visual Studio Code

I recently started using Visual Studio Code and I would like to know, is a way to open files in a new tab? Currently whenever I open a new file the files I currently have open disappear. I say new tab, but any option that will let me open a new file in the same window as the old one works.
I have tried disabling Preview Mode through the workbench settings as shown in this answer: How to config vscode to open files always in a new tab?. However, when I choose Open or Open Recent the new file still replaces my old file.
Thanks.
Once you have to open your settings file, add the "workbench.editor.enablePreview" property and set value to false.
For 1.21.1 version.
In user settings =>
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen"
the best way i found.
Starting with VSCode 1.52 (Nov. 2020), you should not have any more issue: all files will open in new tabs, even in preview mode.
Better handling of preview editors:
Preview editors are now better handled with numerous improvements based on feedback and making this feature work more consistent.
The setting workbench.editor.enablePreviewFromQuickOpen is now disabled by default so that editors opening from quick open will not appear in preview mode anymore.
When you start a navigation (e.g. go to definition), the editor you start from will move out of preview mode to keep it open while the new editor will be in preview mode until you navigate further.
We changed all of our custom trees (the ones used from extensions or Git changes view for example) to work more consistently like our built-in trees (like the explorer).
This means, the following interactions now apply to all of them:
double-click or mouse-middle-click to open non-preview
Enter to open non-preview (Space to open in preview-mode)
Note: if you are the author of an extension that is leveraging our custom tree API, you can benefit from this change as well.
Make sure to use vscode.open or vscode.diff commands for the TreeItem.command and you are in!
A new menu item in the editor overflow menu allows to quickly turn off preview editors altogether:
You need to double click on the name of the file. Also, it needs to be done swiftly elsewhere you will be opening in the same tab.
You can drag and drop file near to the opened tab and the file will open in new tab.
Thanks everyone. Double clicking and dragging was useful, but it still didn't solve my problem when opening files from different projects with the "Open File" menu command. I found that Multi-root Workspaces is what I was looking for. https://code.visualstudio.com/docs/editor/multi-root-workspaces
This is likely due to Visual Studio Code opening file in what's called "Preview Mode", which allows you to quickly view files, ideally if a tab is in Preview Mode then its title in the tab bar, will be italic.
To disable Preview Mode set "workbench.editor.enablePreview": false in your settings file or use the "workbench.editor.enablePreviewFromQuickOpen" option to disable it only from the quick open menu.
Alternatively, use command palette CTL+Shift+P (to get all settings) VScode settings then in User => Workbench => Editor Management you can uncheck Enable Preview and Enable Preview from Quick Open to get the same results described above

VSCode: How to turn off auto select in File Explorer when changing window tabs?

In VSCode, if I have an editor window tab open and I click anywhere in that editor window, the selected file in the File Explorer changes to the file being edited. I would like to prevent that behavior. This is possible in Visual Studio, but I can't seem to find a similar setting in the preferences file of VSCode.
Can anyone provide some suggestions?
This has been added, see https://github.com/Microsoft/vscode/issues/14745.
Configuration is "explorer.autoReveal": false
You can't, at least not today. The only thing you can do, is keeping the scroll position when switching tabs. See this answer for the setting: VSCode prevent file Explorer from jumping
And here is the feature request on Github: https://github.com/Microsoft/vscode/issues/14745
(Feel free to add a "Thumbs Up" via Github Reaction at the top so the request gets more attention in the future, this increases the chances that it gets implemented sooner)

How to Display VS Code output window to side rather than below

In my VS Code set up I see the output/FSI frame below the main text editor pane like this:
whereas I would love it to appear to the right in the side-by-side view like it does on the images in this link: http://www.wintellect.com/devcenter/jwood/a-quick-look-at-f-in-visual-studio-code
Is there a config option I cannot find somewhere?
I tried Googling but drew a blank and cannot see anything obvious in the config options mentioned on the vs code site page describing the config options
as of version 1.51.1 right click in the right corner on the output panel. then select option 'move panel right'
I don't believe you can detach/move the output windows in Visual Studio Code. You can move the side bar to the left/right side, but that's it. There is no config option, sorry.
You could try posting a feature request on the GitHub page: https://github.com/Microsoft/vscode
EDIT: This was changed in VS Code 0.10.8, it was once on the side but was moved to the bottom. See this GitHub issue: https://github.com/Microsoft/vscode/issues/2806
This feature is not available yet in VS Code. However as of today (March 30, 2017) it's on 6 months roadmap so it should be done in a near feature.
This feature is available from version 1.18.0+
Simply click this icon to dock to the right:
Just follow the steps mentioned:
In Visual Studio Code -
View Tab > Appearance > Toggle Panel Position
That's it.
Your original link to the view your desire is obsolete, so it is a guess as to what you wanted. But here is a demo of setting up a terminal/output look side-by-side. It is a little tricky - you drag your Outline header over the Terminal header which will then allow you the option of putting it to the left or right of the Terminal:
its easy. just right-click on the terminal, select 'move panel right' like in the image below and voila
the image can be found here
Vertical Split:
From VS Code Menu bar:
View >> Appearance >> Move Panel Right
Version 1.47.0 of VS Code (at the moment of posting this, the latest one) allows you to drag output (or any other panel tab, e.g. terminal) to the activity bar. This way you can obtain output to the side of the editor.
Just right click on the panel of output section then select "Move panel left or right" as per your wish.
here your can see the move panel left option.
Press CTRL + SHIFT + P
Select Preferences: Open User Settings (JSON)
Insert (or change if it is there --search for it) the following config line:
"workbench.panel.defaultLocation": "right",
Save file.
That will work for new workspaces. VS-Code saves your preferences for each folder you start it in. So, if you navigate to a folder you previously called VS-Code in (I mean, from the terminal), it will open the output panel in the same location it was the last time you have used VS-Code from the same location.
After making the change above, go to a new place, like /opt and start VS-Code there to make a test.