How do I format all files in a Visual Studio Code project?

Use the extension called ”Format Files”. Here are the steps: Download the extension called ”Format Files” on VSCode. Select and open the folder with files to format on VSCode. Press Ctrl+Shift+P to open command palette. Enter “Start Format Files: Workspace” and select this option. Source: https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files

VSCode single to double quote automatic replace

I dont have prettier extension installed, but after reading the possible duplicate answer I’ve added from scratch in my User Setting (UserSetting.json, Ctrl+, shortcut): “prettier.singleQuote”: true A part a green warning (Unknown configuration setting) the single quotes are no more replaced. I suspect that the prettier extension is not visible but is embedded inside the … Read more

How to set per-filetype tab size?

VS Code configures language specific settings in settings.json Shortcut is: Command Palette (⇧⌘P) then: Preferences: Configure Language Specific Settings Example of setting.json changing tabsize { “[sass]”: { “editor.tabSize”: 2 }, “[html]”: { “editor.tabSize”: 4 }, “[javascript]”: { “editor.tabSize”: 2 } } These are not nested inside any other object, they are defined at the root.

Visual studio code – keyboard shortcuts – expand/collapse all

Here it is. Ctrl+Shift+[ Fold (collapse) region editor.fold Ctrl+Shift+] Unfold (uncollapse) region editor.unfold Ctrl+K Ctrl+[ Fold (collapse) all subregions editor.foldRecursively Ctrl+K Ctrl+] Unfold (uncollapse) all subregions editor.unfoldRecursively Ctrl+K Ctrl+0 Fold (collapse) all regions editor.foldAll Ctrl+K Ctrl+J Unfold (uncollapse) all regions Take Look at Visual studio Code Keybindings section at this link. Also Platform specific Key … Read more

Visual Studio Code – Convert spaces to tabs

There are 3 options in .vscode/settings.json: // The number of spaces a tab is equal to. “editor.tabSize”: 4, // Insert spaces when pressing Tab. “editor.insertSpaces”: true, // When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents. “editor.detectIndentation”: true editor.detectIndentation detects it from your file, you have to disable it. … Read more

How can I open Visual Studio Code’s ‘settings.json’ file?

To open the User settings: Open the command palette (either with F1 or Ctrl+Shift+P) Type “open settings” You are presented with two options, choose Open Settings (JSON) Which, depending on platform, is one of: Windows %APPDATA%\Code\User\settings.json macOS $HOME/Library/Application\ Support/Code/User/settings.json Linux $HOME/.config/Code/User/settings.json The Workspace settings will be in a {workspaceName}.code-workspace file where you saved it, and … Read more

Disable tooltip hint in Visual Studio Code

editor.hover.enabled: false in settings.json to Tooltip Click on Edit in settings.json There are two panes Default User Settings “editor.quickSuggestions”: { “other”: false, “comments”: false, “strings”: false } User Settings “editor.parameterHints.enabled”: false, “editor.suggest.snippetsPreventQuickSuggestions”: false, “html.suggest.html5”: false, “editor.snippetSuggestions”: “none”, This also can be done UI. Setting Snippet Suggestions : false Update August 2018 (version 1.27) Goto File=>Preference=>Settings … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)