My 8 favorite VS Code Shortcut #1

Hey ! Welcome here, I’m CodeOz and I’m sharing with you my favorite VS Code shortcut !

Indent the whole line

By default when you are indenting a line on VSCode, the entire line is not indented, so there is a option for this :

editor.action…


This content originally appeared on DEV Community and was authored by CodeOzz

Hey ! Welcome here, I'm CodeOz and I'm sharing with you my favorite VS Code shortcut !

Indent the whole line

By default when you are indenting a line on VSCode, the entire line is not indented, so there is a option for this :

editor.action.indentLines

    {
        "key": "tab",
        "command": "editor.action.indentLines",
        "when": "editorTextFocus && !editorReadonly"
    },

Before

Webp.net-gifmaker

After

Webp.net-gifmaker (1)

Rename variable in all files

If you want to rename a variable from a file you will need to update the name in all other file where you need to use this variable, thanks to this shortcut, it will be more easier to rename your variable across your project !

editor.action.rename

    {
        "key": "shift+f2",
        "command": "editor.action.rename",
        "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
    },

ezgif.com-gif-maker

Select all word in the file

You can also select all word from a word !

editor.action.changeAll

    {
        "key": "ctrl+shift+f2",
        "command": "editor.action.changeAll",
        "when": "editorTextFocus && editorTextFocus && !editorReadonly"
    },

select-all-word

Navigation back, forward and last edit

One of my favorite ! You can navigate across your mouse's historical, from back to forward and from your last edit, it can be very very usefull

workbench.action.navigateBack

workbench.action.navigateForward

workbench.action.navigateToLastEditLocation

    {
        "key": "f1",
        "command": "workbench.action.navigateBack"
    },
    {
        "key": "f2",
        "command": "workbench.action.navigateForward"
    },
    {
        "key": "f3",
        "command": "workbench.action.navigateToLastEditLocation"
    },

naviguate

Navigation at the start and the end of a line

You will earn a lot of time of using this, as mentioned in the title, you can navigate from the start or the end of a line !

cursorLineStart

cursorLineEnd

    {
        "key": "alt+left",
        "command": "cursorLineStart"
    },
    {
        "key": "alt+right",
        "command": "cursorLineEnd"
    }

ezgif.com-gif-maker


This content originally appeared on DEV Community and was authored by CodeOzz


Print Share Comment Cite Upload Translate Updates
APA

CodeOzz | Sciencx (2021-04-18T14:38:11+00:00) My 8 favorite VS Code Shortcut #1. Retrieved from https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/

MLA
" » My 8 favorite VS Code Shortcut #1." CodeOzz | Sciencx - Sunday April 18, 2021, https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/
HARVARD
CodeOzz | Sciencx Sunday April 18, 2021 » My 8 favorite VS Code Shortcut #1., viewed ,<https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/>
VANCOUVER
CodeOzz | Sciencx - » My 8 favorite VS Code Shortcut #1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/
CHICAGO
" » My 8 favorite VS Code Shortcut #1." CodeOzz | Sciencx - Accessed . https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/
IEEE
" » My 8 favorite VS Code Shortcut #1." CodeOzz | Sciencx [Online]. Available: https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/. [Accessed: ]
rf:citation
» My 8 favorite VS Code Shortcut #1 | CodeOzz | Sciencx | https://www.scien.cx/2021/04/18/my-8-favorite-vs-code-shortcut-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.