Skip to content

Instantly share code, notes, and snippets.

@rogeralbp
Created October 30, 2021 21:55
Show Gist options
  • Save rogeralbp/3b9416cf0264a67e07bc10e818132d7e to your computer and use it in GitHub Desktop.
Save rogeralbp/3b9416cf0264a67e07bc10e818132d7e to your computer and use it in GitHub Desktop.
VS Code shorcuts favorites of @rogeralbp

VSCode - Shortcuts

Useful shorcuts to improve the speed and reduce the inverted time during the coding.

Favorites commands and Shortcuts

Delete auto-identation of VS Code

    Mac -> ⇧ ⌥ tab
    Windows -> Shift + tab

Move chunk, lines of code after select it

    ⌥ ↓ / ⌥ ↑
    Alt + ↑ / ↓

Comment chunk or specific entire line of code after select it

    ⌘ /
    Ctrl + /

Comment only a specific word, text, code after select it

    ⇧ ⌥ A
    Shift + Alt + A

Remove chunk of code after select if

    ⇧ ⌘ K
    Ctrl + Shift + K

Remove all instances of variable or memory space of code after select if

    ⇧ ⌘ L
    Ctrl + Shift + L

    and then ..

    ⇧ ⌘ K
    Ctrl + Shift + K

Remove a specific line of code after select if

    ⇧ ⌘ X
    Ctrl + X

Hide Side Bar to be more focused

    ⌘ B
    Ctrl + B

Activate Zen Mode to only be focus on a File

    ⌘ K and then press Z
    Ctrl + K and then press Z

Wrap a text, line or chunk of code in a whatever you type after select it

    First select whatever you want to wrap
    then ...

    ⇧ ⌘ P
    Ctrl + SHIFT + P

    type for Emmet: Wrap with abbreviation

    and the type whatever will wrap the previous thing selected

Clone / Copy line down - up after set the cursor in the line that will be copied

    Shift + Alt +  ↓ / ↑

Create multicursors to edit multiples lines at the same time (fav, fav)

    ⇧ ⌥ ↑ / ↓
    Ctrl + Alt+ ↑ / ↓

Create multicursors to copy multiples lines at the same time (fav, fav)

    ⇧ ⌥ ↑ / ↓
    Ctrl + Alt + ↑ / ↓

    and then  ....

    Ctrl + Shift + rigth arrow -> to copy the same at all lines

Select all the sames instances of name, variable, etc

    ⌘ + D
    
    Ctrl + D

    and then do whatever you want to do ....

Analize by detail the content logic of a file


    ⌘ P => luego escribir la @
    ⇧ ⌘ O

    Ctrl + P => luego escribir la @
    Ctrl + Shift = O

    escribir " : " para agrupar los datos por tipo

    and it will display all the methods, names, variables, etc by detail

Check a specific line of code

    Ctrl + G
    Ctrl + P => luego escribir la :


Go to the End / Beggining of the File

    Ctrl + end/home

Open the Source Control View (to commit, push and pull)

    Ctrl + Shift + G

Open the Explorer View (where all the files are visible)

    Ctrl + Shift + E

Hide/Show the SideBar View (left)

    Ctrl + B

Open input for find especial configuration

    Ctrl + Shift + P and then type ">" 
    
    and the type
    what you are looking for

Open Preview of Markdown on a new tab

    Ctrl + Shift + P and then type ">" 
    
    and the type
    
    "Markdown: Open Preview"

Open Preview of Markdown on the Sreen Side (right side)

    Ctrl + Shift + P and then type ">" 
    
    and the type
    
    "Markdown: Open Preview to the Side "

Change the name of a symbol and all the childs instances

    set the cursor on the symbol and press F2 
    and type the new name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment