How to restore default setting in VS Code - c++

I was playing with VS code settings (I wanted to explore VS Code) and suddenly the code editing got changed. Previously the code was more colourful and there were different colours for different keywords. Now my code is mostly white. Please help me to get back to default code formatting settings.

To revert the settings completely, open the settings JSON file by bringing up the command palette (Ctrl+Shift+P) and running the command Preferences: Open Settings (JSON). Delete everything in there and save the file.
However, you might just have switched to a different theme by accident. To check that, open the theme chooser (Ctrl+K, T) and try the other themes.

Related

VS Code - Failing to take input from terminal

I am fairly new to tweaking with the settings in VS Code. I have installed the code runner extension on VS Code. I have also updated the settings to make the code run in terminal, instead of the output tab.
This works fine with other languages, but in case of C++, it fails to take inputs and finishes execution as soon as it compiles. What could be causing this?
Go to settings in VS Code, and look for the property "Run in Terminal" under Code Runner settings. Check that box, and update your compiler directory. Once you do this, reload the VS Code window and run your code again, the terminal should take inputs now.

Visual studio 2019 Custom colors overridden

I have just upgrade from VS2017 to VS2019 and I have my own colors on classes, enums etc. that I would like to be the same in VS2019. I export all my settings, install all the same extension (for example Viasfora, SemanticColorizer) from VS2017 in VS2019, and then import my settings from VS2017.
I open a .cs file and I see my colortheme and 1sec later the colors change to some standard colors.
I have tried the unchecking the "Use enhanced colors for C# and Basic" under options.
And hereĀ“s the kicker, the "code preview side-window" shows the right colors...
Anyone got an idea of what this is and how to solve it?
Regards
Ok, from what I have learned so far is that there are more parameters for color customizations in VS19 and there is some name changes that stops the import.
What I did was installing VS theme editor(VS19ThemeEditor)
Changed a bunch off settings in there.
Then I added SemanticColorizer and ViasFora, then went to Tools-->options-->Enviroment-->Font and colors. Changed alot of things there.
And for fun added ClaudiaIDE
TL;DR
You cant export from VS17 to VS19 and expect colors to be the same, you need to edit them again.

Qt Application not running

I am trying to run a simple "Hello, world" console application but I am experiencing some errors when compiling that I am not familiar with. I have done a bit of research into similar problems with Qt but I haven't been able to find a solution. The closest solution I have come across was to change my Patch Command setting under:
Preferences -> Environment -> System -> Patch Command
to
usr/bin/xterm -e
However, when I try to do this it goes red indicating that I do not have this file.
Environment Preferences Window
The following image is a screenshot of what is displayed in the terminal window when attempting to compile my project.
Console Application Output
Any help on this problem would be much apprectiated! It is very frustrating having something like this hold me back!
Don't run your project in a terminal unless you actually select a working terminal, and that's all. The patch command is irrelevant in this anyway - it's not the terminal, but the patch command -- used to patch source code. You don't need it unless you explicitly use code patching. Go to Projects (Ctrl-5), click on the active Run configuration for your project, uncheck "Run in terminal", done.

Less compiler issue (probably)

I have installed the less compiler extension
https://github.com/madskristensen/LessCompiler
When I create a less file and save it, it isn't building CSS and min.css file for me.
In the lower right corner, I clicked on the watermark and less is enabled for the project. What am I missing here?
Please take a look at the screenshot.
Update 1:
I have created a test MVC site and added a less file to it. No CSS getting generated over here as well.
Update 2:
I have installed web essential 2017 and WebCompiler is there now. Still no css files. Selecting the file and Shift+Alt+Q not working. Also when i right click on the file, i don't get re-compile menu option as being discussed in the following thread:
https://github.com/madskristensen/WebCompiler/issues/299
I am using Visual Studio Enterprise 2017 version 15.5.6
Had the same issue. For me it turned out node was no longer in my path which is required to compile. The output tab has a drop down with LESS compiler as an option to help troubleshoot.

visual studio code showing wrong autocomplete suggestions in c++

I am trying to learn SDL in C++ So auto-complete is very essential for me.VS code was working fine with SFML but due to android problems I started learning SDL and now auto-completions for SDL is not working correctly . It always suggest some wrong members ,even If I didn't include any library . I don't have enough experience with VS . I came to VS from neovim only for auto completions which not working properly :(
I had tried restring ,updating and deleting .vscode dir but nothing happened
Hover your cursor on the header file mentioned in the source code
You'll notice a red/green swiggly underline
A light bulb icon appears, click on it
select the option called "edit includepath setting"
It takes you to a new "c_cpp_properties.json"
In this json file, under your platform, add all the paths to the headerfiles
After doing this, most of the unwanted intellisense results disappear. Only releavent ones show up the top.
VS code is a very good tool which comes with source control features. Add C++ extension and a debugger and you are good to go.