By mistake I pressed on "don't show this again". How can I make vscode show that option again?
There is a setting that enables/disables that message:
Workbench > Editor > Untitled: Hint
By selecting "Don't show again" you disabled that setting (setting it to hidden).
To get the message back, reenable it - set it to text.
Press ctrl + shift + P
Type Change Language Mode press enter
You will get menu with all the languages.
Additionally you can save the file with correct extension to get all the language support installed in your VS code.
Hope this helped
I follow above answer I solved for me
Related
I have the following situation.
I cannot change launch Dart configurations anymore since the button is missing.
I think I hid it by accident but I cannot make it appear anymore.
Launch.json is still accessible but the button has disappeared.
Any help is appreciated, I don't really want to reinstall VS Code and I don't think it would help.
An alternative, if anyone else is facing this: If you right-click the gear and check "Start debugging" then that should bring it back. Despite the name, it won't actually start a debugging session!
I've found out how to restore the button's position.
Type the keyboard combination to start a Command (e.g.Command + Shift + P on MacOS) and run the command View: Reset All Menus.
This'll make the hidden view reappear.
The option to hide it is called Hide 'Start Debugging' and it cannot be found in the settings, so you have to reset the views to make it reappear.
if resetting the menu from command option by pressing: Ctrl + Shift + P and typing the command View: Reset All Menus may work. In case it didn't I suggest you to open a seperate command line i.e CMD or Terminal in VS Code itself then typing the command Flutter Run may help. Also you can press in the terminal R to hot reload your flutter, dart app.
I used to be able to be able to Ctrl+F to search whatever was logged in VS Code. Now, for some unknown reason, the search bar doesn't show up when I type in Ctrl+F.
I am on version 1.57, which is the latest at this time.
This question if for the Debug Console which isn't the tab I am looking at.
Click anywhere inside the output panel, and then press Ctrl + F
I realized that the Vim extension is what is causing this. Ctrl+F is for scrolling and although previously Vim keyboard shortcuts didn't work in the output panel, they seem to have been extended to it recently see this issue I raised.
A few weeks ago, refactoring code using F2 worked without any confirmation. Since a few days, however, using F2 opens up a "Refactor preview" tab in the bottom panel.
The refactoring will not be done until I manually check what I want to refactor, and click the checkmark at the top right.
I cannot find anything online or in the vscode settings. Can this be disabled so that the refactoring automatically proceeds like it used to?
Are you accidentally pressing Shift + Enter after renaming?
This behavior should only happen after you press F2, change the name of the item, and then press Shift + Enter. Pressing only enter should automatically perform the rename without the refactor preview tab opening. The rename box states this:
In case its not clear, here is a video that illustrates this.
Note: This solution is only for c/c++ case. The reason is that C/C++ extension is doing bad in analyzing the code and relies on user to determine which ones to rename, then the preview panel is poped up for this.
Try disable Editor > Rename: Enable Preview in settings, and then restart vscode.
If the problem still exists, try replace C/C++ extension's intellisense with clangd:
Install clangd extension in vscode;
Disable C/C++ extension's intellisense by adding this to settings.json:
"C_Cpp.intelliSenseEngine": "Disabled"
Then vscode will adopt clangd's intellisense, which renames without a preview.
Uninstalling C/C++ extension is NOT recommended because intergrated gdb will be lost, but you can try lldb as a substitude:
Install CodeLLDB extension in vscode;
Configure cmake's default debug type to lldb in settings.json:
"cmake.debugConfig": {
"type": "lldb"
}
I'm having some trouble with my VS Code Find behavior. Whenever I hit CTRL + F it gives me the Find window, but the Find in section is active (attached screenshot) as a default, which in NOT what I want. It's really annoying to click there to disable this.
Thank you.
Press CTRL+< to open the settings editor, then look for autoFindInSelection. Likely, it is set to always so change it to never.
I don't know why my code is auto formatted on save and for some reason changing the layout. I figured out this was due to auto format on save. How do I turn auto save off in Visual Studio Code?
For Windows:
Here are the some basics steps to be followed to turn off auto complete.
Step:1 - Press Ctrl + Shift + P to open Command Palette. Then screen like below image appears.
Step:2 - Type Save without formatting and click the matching option available. It either commands on click or redirects you to next interface.
If it works on click then it's fine and if your are redirected to next screen just uncheck auto format option under onsave. For me it worked on cick to the shown command.
For Mac:
Cmd+K S
This was introduced in back in 2018, the keybinding (on MacOS) is:
Cmd+K S
For keybindings for your own system, search for the command saveWithoutFormatting in the Command Palette
Default: Ctrl + k + Ctrl + Shift + s on 🪟 Windows.
For others having the same problem and if Save without format is inconvenient to do every time and if you want permanent settings for saving without format here are the steps:
Edit the settings.json file. You can do that with the command "Open Settings (JSON)"
press Command + Shift + P (to open the command palette)
and start typing the command "Open Settings (JSON)" and select from the suggestions.
The setting is named formatOnSave and you should set it to false, to disable it. It can be present multiple times for different types of things.
"editor.formatOnSave": false
It is best to search for "OnSave", because there might also be other settings that are doing formatting on Save, for example:
"editor.codeActionsOnSave"
In mac you can save without formatting with the following shortcut, (No need to touch the config):
If you don't want to open the command palette every-time, you can change the Ctrl/Cmd + S shortcut to make the action "Save without Formatting"
and remove the shortcut for "Save".