Skip to content

VS Code: Tips

See VS Code’s settings.json for other tips and options

Terminal window
# Update all extensions
code --update-extensions

Visual Studio Code added a new setting:

// Controls whether syntax highlighting should be copied into the clipboard.
"editor.copyWithSyntaxHighlighting": true,

See VS Code settings

If you set that to false, then the Copy command will copy without formatting and you can use the Copy With Syntax Highlighting command when needed.

If using VS Code with a screen reader or Windows Text to Speech. After turning it on you will get sounds coming on text detection. You can turn it off by turning off the screen reader detection on the bottom toolbar.

  • Toggle between Light/Dark Themes
  • Commit all - git commit all in a repository
  • Terminal: Run Recent Command (only supported Terminal integration shells)
  • Terminal: Go to Recent Directory (only supported Terminal integration shells)
  • Copy With Syntax Highlighting (see Copy Paste with or without formatting)
  • Inline Suggestion Toolbar: can be enabled to accept with tab and accept words with Ctrl + right arrow similar to fish shell acceptance
  • Use setting editor.copyWithSyntaxHighlighting to control whether copy paste should include rich formatting like syntax highlighting. Default is true.
  • Navigate Headers in Markdown, variables, functions - Use command Go To Symbol or Ctrl+P + @
  • If Format Document is not working such as for tables, use command Format Document with and select Markdown all in One of appropriate formatter.

  • Drag and drop links, images, files into Markdown files. VS Code will detect the proper content to insert into the Markdown file. Hold Shift while dragging the file over a Markdown editor to drop it into the editor and create a link to it.

  • VS Code supports running Find All References in Markdown files for headers. Right click on a Markdown header and find all places where the header is used.

  • Find all the references to a given Markdown file in the current workspace. Again this includes links across files.

  • o find references to the current Markdown file, use the Markdown: Find File References command.

  • To find references to a Markdown file in the Explorer, right-click on it and run Find File References command.

  • Run Find All References on the file part of a link to a Markdown file, such as text.

  • Support finding all places where a given URL is used in the current workspace.

  • Markdown: Rename headers - place your cursor on a header and then press F2 to start a rename. Enter the new text for the header and then press Enter to accept. This will both update the current header as well as updating all known links to it in the current workspace.

  • Markdown: rename reference links also supported.

  • Markdown: Rename files - use F2 on file paths in Markdown links to both rename the file on disk as well as updating all Markdown references to it:

  • Validation of links is supported using setting "markdown.validate.enabled": true.

  • Extract to link references use Extact to link definition command.

  • Profiles in Visual Studio Code (introduced in VS Code Profiles) can set extensions, settings, shortcuts, UI state, tasks, and user snippets. They can be:
  • Customized
  • Set in settings (gear), like for workspaces, folders
  • Shared with others
  • The Command Center has been polished and is now ready to be tried. Enable it via window.commandCenter setting. The Command Center replaces the normal title bar and lets you quickly search for files in your project. Click the main section to display the Quick Open dropdown with your recent files and a search box.
  • Toggle Autosave on files to ensure they are regularly saved

Http: Proxy (not synced): http://1.1.1.1:3128 or set in VS Code JSON settings

"http.proxy": "http://1.1.1.1:3128",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": false,

Tips are taken from reading tutorials and reading monthly updates.