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
After
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"
},
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"
},
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"
},
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"
}
I hope you like this reading!
🎁 You can get my new book Underrated skills in javascript, make the difference
for FREE if you follow me on Twitter and MP me 😁
Or get it HERE
☕️ You can SUPPORT MY WORKS 🙏
🏃♂️ You can follow me on 👇
🕊 Twitter : https://twitter.com/code__oz
👨💻 Github: https://github.com/Code-Oz
And you can mark 🔖 this article!
Top comments (3)
thanks for this!
Nice thanks
Some comments may only be visible to logged-in visitors. Sign in to view all comments.