VS Code: Tips
See VS Code’s settings.json
for other tips and options
Extensions
Section titled “Extensions”# Update all extensionscode --update-extensions
Copy Paste with or without formatting
Section titled “Copy Paste with or without formatting”Visual Studio Code added a new setting:
// Controls whether syntax highlighting should be copied into the clipboard."editor.copyWithSyntaxHighlighting": true,
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.
Accessibility
Section titled “Accessibility”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.
Command Palette Useful Commands
Section titled “Command Palette Useful Commands”- 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)
Completions
Section titled “Completions”- Inline Suggestion
Toolbar:
can be enabled to accept with
tab
and accept words withCtrl + right arrow
similar to fish shell acceptance
Copy Paste
Section titled “Copy Paste”- Use setting
editor.copyWithSyntaxHighlighting
to control whether copy paste should include rich formatting like syntax highlighting. Default istrue
.
Development
Section titled “Development”- Navigate Headers in Markdown, variables, functions - Use command
Go To Symbol
or Ctrl+P + @
Markdown
Section titled “Markdown”-
If
Format Document
is not working such as for tables, use commandFormat 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
Section titled “Profiles”- 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
Terminal
Section titled “Terminal”- Terminal supports quick fixes suggestions on mis typed commands
- Task actions in the terminal
dropdown:
manage tasks with
run task
andconfigure tasks
. - Terminal Accessibility Mode: allow screen readers to navigate through terminal buffer via keyboard
Useful Configuration
Section titled “Useful Configuration”- 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
Search
Section titled “Search”- Include and exclude folders from Search - When right-clicking a folder in the Search view’s tree view of results, there are now two new options in the context menu.
Proxy Settings
Section titled “Proxy Settings”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,
See Also
Section titled “See Also”Tips are taken from reading tutorials and reading monthly updates.