vscode code - ghdrako/doc_snipets GitHub Wiki

Editor

  • <Ctrl><J> - terminal show / hide
  • <Ctrl><B> - toggle sidebar show / hide
  • <Shift><Ctrl><B> - show command pallete
  • <Ctrl><\> - Split editor

Search file to open

<Ctrl><P>

Column Box Selection

<Ctrl>+<Alt>

Error/Warnings

<F8> go to next and show message

Code Folding (Zwijanie/Rozwijanie bloku kodu)

<Shift><Ctrl><[> or <Shift><Ctrl><]>

Indent/outdent lines

<ctrl><[> or <ctrl><]>

Formating

<Ctrl><Alt><F> or by context menu

editor.formatOnSave

Coment of code

  • <Ctrl></>
  • <shift><alt><A> - block coment

Go to definition

Line Action

  • <Shift><Alt><DownArrow> , <Shift><Alt><UpArrow> - copy line and insert it belowe or above current position
  • <Alt><UpArrow>,<Alt><DownArrow> - move line below or above current position
  • <Ctrl><Shift><K> - delete current line
  • <Ctrl><L> - select line
  • <Ctrl><G> - go to line number

IntelliSense

<Ctrl><Space>

Multi cursor

  1. Create cursor on all instance of string
    • select sting
    • press <Ctrl><Shift><L>
  2. Select multiline cursor <Ctrl><Alt><DownArror> or <Ctrl><Alt><UpArror>
  3. Place cursor anywhere <Alt>+Click

Compare file

  • Right click the first file and "Select for Compare"
  • Right click on the second file and "Compare with Selected"
  • You should see the diff panel appear once you've completed these steps:

Shortcuts

<Ctrl><B> - enhance editor (hide left panel)

Side-By-Side Editing - Multiple file editing in parallel

  • Right-click a file name in the Explorer bar and then select Open to Side.
  • Alt-click on a file in the Explorer.
  • Ctrl+\ to split the active editor into two.
  • Open to the Side (Ctrl+Enter) from the Explorer context menu on a file.
  • Click the Split Editor button in the upper right of an editor.
  • Drag and drop a file to any side of the editor region.
  • Ctrl+Enter (macOS: Cmd+Enter) in the Quick Open (Ctrl+P) file list. When you have more than one editor active, you can switch between them easily by holding the Ctrl (macOS: Cmd) key and pressing 1, 2, and 3.

Minimap

you can move the minimap to the left-hand side or even disable it completely by simply setting “editor.minimap.side”:, “left”, or “editor.minimap.enabled”: false in your user or workspace settings.

Explorer

Ctrl+P (Quick Open option) to quickly search and open a file by its name.

If you need to run a command-line tool in the context of the folder you have open in VS Code, right-click the folder and select Open in Command Prompt (or Open in Terminal on macOS or Linux).

Zen Mode

Ctrl+K Z. To exit Zen mode, press double Esc. The transition to full screen can be disabled via zenMode.fullScreen. Zen mode can be further modified using the following settings: zenMode.hideStatusBar, zenMode.hideTabs, zenMode.fullScreen, zenMode.restore, and zenMode. centerLayout.

Editor Groups

  • Ctrl+PageDown go to the right editor.
  • Ctrl+PageUp go to the left editor.
  • Ctrl+Tab open the previous editor in the editor groupMRU list.
  • Ctrl+1 go to the leftmost editor group.
  • Ctrl+2 go to the center editor group.
  • Ctrl+3 go to the rightmost editor group.
  • Ctrl+F4 close the active editor.
  • Ctrl+K W close all editors in the editor group.
  • Ctrl+K Ctrl+W close all editors

Plugins

VS Code supports Markdown files out of the box. To switch between views, press Ctrl+Shift+V in the editor. You can view the preview side-by-side (Ctrl+K V) with the file you are editing and see changes reflected in real-time as you edit.

Workspace

A project that consists of one or more root folders, along with all of the Visual Studio Code configurations that belong to that project. These configurations include:

.code-workspace file

It is a JSON file with comments that stores all of the configuration data mentioned above, in addition to the location of all root folders belonging to a workspace.

The .code-workspace is needed only if you're creating a multi-root workspace, in which case you'll have a single .code-workspace file that automatically restores all of the workspace settings, in addition to all of the root folders that you want to be displayed in the Explorer.

⚠️ **GitHub.com Fallback** ⚠️