Questions tagged [visual-studio-code]

Visual Studio Code is a text editor available for Linux, Mac, and Windows. You can also use this tag for unofficial binaries of the portion of the code that is open source (such as VSCodium) as well. It includes support for debugging, embedded Git control, various extensions and rich development experiences such as intelligent code completion. It is mainly developed by Microsoft, and built on Electron like GitHub's Atom.

Visual Studio Code is a lightweight, but powerful, source code editor developed by Microsoft. It runs on the desktop and is available for Windows, Mac, and Linux. It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, and PHP) and runtimes. It is licensed under the Microsoft Software License Terms, but most of the source code is available under the MIT license. There are unofficial binaries (such as VSCodium) that contain only the MIT-licensed code.

Visual Studio Code uses the Blink layout engine to render the interface, Electron for the framework, and TypeScript for the program logic.

Links

Syntax

Language packages extend the editor with syntax highlighting and/or snippets for a specific language or file format.

Migrating from other editors

The Visual Studio Code team provides keymaps from popular editors, making the transition to Visual Studio Code almost seamless and easy.

Migrating from Vim

Vim Mode - Relatively new, but promising extension implementing Vim features in Visual Studio Code

Migrating from Atom

Popular Atom keybindings for Visual Studio Code

Migrating from Sublime Text

Popular Sublime Text keybindings for Visual Studio Code.

Migrating from Visual Studio

Popular Visual Studio keybindings for Visual Studio Code.

Migrating from IntelliJ IDEA

Popular IntelliJ IDEA keybindings for Visual Studio Code.

Using Visual Studio Code with particular technologies

Microsoft created a collection of recipes for using Visual Studio Code with particular technologies (mostly Web).

Make sure to visit it at Microsoft/vscode-recipes

Related Tags

56460 questions
246
votes
16 answers

How to disable or hide scrollbar/minimap?

I can't find any option, setting, or keyboard shortcut that disables or hides that annoying scrollbar. I just don't find it useful and it's distracting. Can't just edit the editor's CSS like Atom, either.
user41997
  • 2,751
  • 2
  • 12
  • 12
243
votes
14 answers

Visual Studio Code change font size for file explorer tray?

How do I change the font size for the file explorer in Visual Studio Code? There is not an option in the settings.json file.
D Shorter
  • 2,431
  • 2
  • 10
  • 3
241
votes
9 answers

Visual Studio Code: How debug Python script with arguments

I'm using Visual Studio Code in order to debug a Python script. Following this guide, I set up the argument in the launch.json file: But when I press on Debug, it says that my argument is not recognized and Visual Studio Code says: error:…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
241
votes
32 answers

VSCode single to double quote automatic replace

When I execute a Format Document command on a Vue Component.vue file VSCode replace all single quoted string with double quoted string. In my specific case this rule conflicts with electron-vue lint configuration that require singlequote. I don't…
attdona
  • 17,196
  • 7
  • 49
  • 60
241
votes
10 answers

How can I remove duplicate lines in Visual Studio Code?

Say you have the following text: abc 123 abc 456 789 abc abc I want to remove all "abc" lines and just keep one. I don't mind sorting. The result should be like this: abc 123 456 789
Younes
  • 2,863
  • 3
  • 15
  • 10
240
votes
40 answers

Pylint "unresolved import" error in Visual Studio Code

I am using the following setup macOS v10.14 (Mojave) Python 3.7.1 Visual Studio Code 1.30 Pylint 2.2.2 Django 2.1.4 I want to use linting to make my life a bit easier in Visual Studio Code. However, for every import I have states "unresolved…
jAC
  • 3,155
  • 3
  • 18
  • 29
237
votes
7 answers

How to trigger parameter hints in Visual Studio Code?

I want to show parameter hints when I position cursor within the parentheses of the calling method. Note: I know similar answers already exist for Visual Studio on Reddit, but I couldn't find a quick answer for this question on Stack Overflow. So…
Matej
  • 7,728
  • 4
  • 23
  • 30
237
votes
10 answers

Change highlight text color in Visual Studio Code

Right now, it is a faint gray overlay, which is hard to see. Any way to change the default color?
duyn9uyen
  • 9,585
  • 12
  • 43
  • 54
236
votes
16 answers

How to indent/format a selection of code in Visual Studio Code?

I want to indent a specific section of code in Visual Studio Code. I read How do you format code in Visual Studio Code? that gives shortcuts to indent the whole code, but it doesn't work when selecting a specific section of code. I tried Ctrl +…
Damien Leroux
  • 11,177
  • 7
  • 43
  • 57
236
votes
3 answers

How to set per-filetype tab size?

How to set tab size is already answered here. But how to have different settings for different file types? E.g. I want the tab size for HTMLs to be 2, but for other files to be 4.
Ron
  • 7,588
  • 11
  • 38
  • 42
233
votes
10 answers

Open the same directory twice

On command line, I could open a directory like: code . Now, I want two of the identical diretory opened and displayed in another window. (It's not spliting the editor) Then, I tried again. code . Nothing happened. There's still one…
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
233
votes
5 answers

Visual Studio Code Search and Replace with Regular Expressions

I want to use "Search And Replace" in Visual Studio Code to change every instance of

content

to #### content within a document using a Regular Expression. How can I accomplish that?
Tom
  • 4,070
  • 4
  • 22
  • 50
231
votes
10 answers

Visual Studio Code: .git folder/file hidden

I am trying Visual Studio Code at this moment. Everything about Visual Studio Code look really cool to me except one thing: .git folder/file is hidden in Visual Studio Code. I often change Git setting by modifying the .git configuration file. It is…
Bumsik Kim
  • 5,853
  • 3
  • 23
  • 39
228
votes
7 answers

How to show full-file git blame in vs code

At one point I found a way to show line-by-line git blame within vscode. I now cannot recall or find the means with which to do that. I have the Git Blame extension, but that only shows blame on a single selected line.
Douglas
  • 3,093
  • 4
  • 22
  • 22
227
votes
4 answers

Auto import in Visual Studio Code only offering absolute path with Lerna subpackages in TypeScript

For some reason, very recently my Visual Studio Code changed and started only offering absolute imports from the sub-package level with my Lerna packages, for example: As you can see, the auto import is suggesting the @package/server/src/database…
Anupheaus
  • 3,383
  • 2
  • 24
  • 30