VS Code

Author

Mattias Villani

Useful commands and navigation in VS Code

  • Access the command palette in VS code: Ctrl + Shift + p
Prefix Mode Name Scope Description Example
> Command Mode Global

Run VS Code commands

This is the default mode.

> settings
@ Symbol Navigation Current file Navigate to symbols, optionally sort or filter by type @ myFunc
@: sorts objects by type, not by position in file like @ does.
  • Cycle between open files in the editor: Ctrl + Tab

  • Navigate in the editor to previous cursor positions (even between files):

    • Go back to previous cursor position: Alt + ←

    • Go forward to next cursor position: Alt + →

  • Toggle visibility of the terminal area: ctrl + j

  • Making VS code like RStudio’s window panes by placing the REPL in the editor area:

    • ctrl+shift+p to open command panel

    • Type settings and select the option Preferences: Open User Settings (not the JSON version)

    • In the Search settings box: type terminal defaultlocation to filter down to the setting that we want to change.

    • In Terminal > Integrated: Default Location, select Editor in the dropdown menu.
      You can now move the editor around freely by drag and drop of the window.

Useful commands in Julia for VS Code

  • Here is the documentation for the Julia extension.

Useful extensions

  • Julia - Official support for the Julia language in VS code.
  • R - Work with R in VS code.
  • Python - Python language support.
  • LaTeX workshop - LaTeX support in VS code.
  • vscode-icons - brings nice symbols to folders and files.
  • Subtle Match Brackets - nicer handling of matching brackets in the editor.
  • Live Preview - live preview of HTML directly in VS code.
  • Markdown all in one - Markdown support in VS code.
  • Quarto - Quarto support.
  • Code Runner - run code in many different languages in VS code (not needed to run Julia code however since it has its own runner in Julia for VS code extension).
  • Excel Viewer - Editors and previews for CSV files and Excel spreadsheets in Visual Studio Code.
  • Git Lens - supercharge your Git experience in VS code.
  • VS code Spotify - Play music in VS code.