How do disable new "gray out errors" in Visual Studio Code? - visual-studio-code

Just recently, Visual Studio Code started "graying out" errors when they appeared in my code. If you don't know what I'm referring to, look here:
I would like to disable how Visual Studio Code does this, and return to the default syntax highlighting of everything, but still include the red underlining of errors.

This was documented in the VS Code 1.24 release notes. The solution is to go to your user settings by using CTRL+, and then add the following two lines:
"javascript.showUnused": false,
"typescript.showUnused": false

Related

Visual Studio Code inconsistent syntax highlighting with tags colors

I'm having an issue with Visual Studio Code. For some .vue files, sometimes, the syntax highlighting colors are inconsistent. I haven't been able to determine a pattern.
Here's an example of two files opened with almost same code.
These are the extensions I have installed:
I can't find a way to resolve this issue.
Volar and Vetur together were the problem. I'm working with Vue 2, so I deactivated Volar and everything works perfect now.

How do I remove this popup in Visual Studio Code?

This is related to tools used for programming: how do I remove this thing that shows up in Visual Studio Code when I write any syntax? (Please ignore the code: I just started two days ago.)

Incremental search shortcut in visual studio code

Can I do "incremental search" / "incremental find" in Visual studio code, similar to eclipse and regular Visual studio? I think it's ctrl+j in eclipse and ctrl+i in visual code.
What it does is that it enables typing anywhere in the file and highlighting matches.
So I had the same issue, and the plugin that wardw found did not work with ctrl+g to cancel the search and return to editing. It turns out that siegebell, the original author of that plugin, posted a bug to the visual studio code people regarding this, and they eventually added the capability to cancel the window, but the plugin hasn't been updated in awhile.
I decided to fork the plugin, and update it myself to work. Link here.

How to assimilate into visual studio code from visual studio ( the difference of hotkeys )?

I have been using VS for years. I'm trying to use vscode to develop frontend project.
This is my first time touching visual studio code. I feel the hotkeys are so different when compared with visual studio 2015. For example, format code in VS is ctrl+k+f and format code in visual studio 2015 is shift+alf+f. If I even want to perform a simple copy/paste folder operation I also cannot.
As I know, visual studio code supports customized hotkeys. So, I think that someone may have already config the hotkeys in a form like visual studio 2015.
However, I'm not sure this is even possible.
Please give me some suggestion or direction.
There are a few ways to solve this:
manually recreating all the keys you love from Visual Studio in your keybindings.json
Hoping somebody else has made one that you can copy and paste into your keybindings.json -- I can't find any
Find one in the marketplace. There are a few keybinding extensions, but I don't see any for Visual Studio, though there is a Resharper one if you're used to that.
If you do end up doing number 1, you could benefit the community by bundling it as an extension to share on the marketplace.
Edit: typo. exceptions -> extensions

How do I auto-indent Python code in Visual Studio Code?

I'm using Visual Studio Code (not Visual Studio) on Linux and I can't seem to find out how to turn on auto-indentation for Python. I've looked all over preferences, spent some time on Google, and can't find anything.
Does anyone know how to do this?
In VS Code you can set the indentation in several places :
General/Workspace settings (bottom bar),
User settings,
language formatter settings.
When using Python, no matter what settings you set, all of them are overridden by the autopep8Args value of the autopep8 language formatter setting, which has an indent size of 4.
By default, autopep8 is used as VS Code Python formatter, but there are others, like yapf.
To update the indent size of this formatter, search in your user settings the "python.formatting.autopep8Args" and set it to : ["--indent-size=2"],
"python.formatting.autopep8Args": ["--indent-size=2"],
Visual Studio Code doesn't have much support for Python (yet), aside from syntax-highlighting, and per-file intellisense (meaning it'll provide suggestions for symbols that have been found within the current file).
I'm willing to bet that the Visual Studio Code team will, eventually, increase their support for Python within Visual Studio Code, and with this, they'll likely add support for auto-indentation.
In the meantime, it might be worth trying this Visual Studio Code extension, which aims to add better support for Python, into Visual Studio Code.
The extension does add auto-indentation for Python, to Visual Studio Code, along with many other features.
Happy scripting!
I auto-format python with autopep8, vscode can use it. It can be easily configured for tab-size and other stuff creating the config file: $HOME/.config/pep8
Here an example of that file:
[pep8]
indent-size = 2
max-line-length = 100