Motivation

As a data scientist, you might find yourself spending a lot of time on your computer and keyboard. If the construction worker has his power tool, data scientists have their keyboard as their to-go tool. If you can find a way to use your tool more efficiently, you will save yourself a lot of time. That is why I am a big fan of keyboard shortcuts.

If you don’t use keyboard shortcuts frequently, it is time to switch it up. It might take a little bit of time to master the keyboard shortcuts, but once you master them, you will find yourself coding much faster without using a mouse between lines. If you save 30’ per day by using keyboard shortcuts, you can have 3.5 hours every week!

VSCode is my favorite IDE because of its useful keyboard shortcuts and extensions. I cover some of the extensions to view code and incorporate the best practices for Python**, **butI haven’t gone in-depth in keyboard shortcuts.

There are many keyboard shortcuts in VSCode and they might overwhelm you. In this article, I will narrow down to just my top 9 frequently used keyboard shortcuts.

If you find it a lot to remember, just write these keyboard shortcuts on a small sheet of paper and use it as a reminder when you learn these keyboard shortcuts. Even if you can learn 1 keyboard shortcut out of this article, that already helps you code much faster than not using any keyboard shortcut.

Basic Editing

Note:_ The keyboard shortcuts listed in this section can be used for different editors such as Medium or Word._

Expand the selection to the next or previous word

Instead of using the mouse to choose the specific text or using Shift + left to expand the selection to the next or previous character, it is faster to use **Shift + Ctrl + Left/Right **to expand the selection to the next or previous words.

Image for post

Select words from the current cursor to the end, or the beginning of the line

If you want to select words from the current cursor to the end of the line, you can use Shift + Ctrl + Left/Rightto expand the selection to the next or previous words like mentioned above, but there is a quicker way than that.

Use **Shift + End **like below to expand the selection from the current cursor to the end of the line.

Image for post

And to expand the selection from the current cursor to the beginning of the line, use Shift + Home.

#vscode #code #keyboard #data-science #keyboard-shortcuts

Top 9 Keyboard Shortcuts in VSCode for Data Scientists
1.65 GEEK