VS Code Shortcuts for code newbies [mac/windows][GIF]
Tags: codenewbie, beginners, womenintech, vscode
Published: 2019-12-08 21:29:14

As a codeNewBie I realised the importance of shortcuts as soon as I started programming. Shortcuts not only allowed me to code quicker but it also helped me stay on my keyboard instead of reaching out to my mouse every time, which at times does start to get annoying. If you are a codeNewBie like me then I would highly suggest you to learn the shortcuts below: 


### Basic shortcuts
You should know the following shortcuts regardless of whether you are learning how to code or not. These shortcuts work everywhere and not particular to VS Code.  

####Select All
- Mac - **⌘ + A** 
- Windows - **Ctrl + A** 

####Copy
- Mac - **⌘ C**
- Windows - **Ctrl C** 

####Paste
- Mac - **⌘ + V** - 
- Windows - **Ctrl + V** 

####Save current file
- Mac - **⌘ + S**
- Windows - **Ctrl + S** 

####Undo last action
- Mac - **⌘ + Z**
- Windows - **Ctrl + Z** 

####Open file
- Mac - **⌘ + O**
- Windows - **Ctrl + O** 

####Close window/tab
- Mac **⌘ + W**
- Windows - **Ctrl + W** 

####Search for keywords on your current document
- Mac **⌘ + F** 
- Windows - **Ctrl + F** 

###VS code specific shortcuts
As soon as I open my VS code editor I always try to make sure I practice the following shortcuts:

####Sidebar open/close
- Mac - **⌘ + B** 
- Windows- **Ctrl + B** 

![command-b](https://thepracticaldev.s3.amazonaws.com/i/whoutuvhysyux0neth83.gif)

####Open new tab
- Mac - **⌘ + N**
- Windows - **Ctrl + N** 

![command-new](https://thepracticaldev.s3.amazonaws.com/i/ag88cq3hianjuqbl2pgv.gif)

####Cut line (copies the line and removes it)
- Mac - **⌘ + X** 
- Windows - **Ctrl + X** 

![option-click]
(https://thepracticaldev.s3.amazonaws.com/i/f4juhnj9wdvnetd3p2q0.gif)

#### Quick Fix [Suggests spelling correction if code spell checker plugin is installed]
- Mac - **⌘ + .**
- Windows - **Ctrl + .** 

![quickfix](https://thepracticaldev.s3.amazonaws.com/i/hfhvd6cxlfajf7ia1mrm.gif)

####The beginning/end of a code line

- Mac - **⌘ + ←/→**
- Windows - **Ctrl + ←/→**

![beginning-end-line](https://thepracticaldev.s3.amazonaws.com/i/bfe1p3zzwseuvk7qadcv.gif)

####The beginning/end of the file

- Mac - **⌘ + ↑/↓**
- Windows - **Ctrl + ↑/↓**

![beginning-end-file](https://thepracticaldev.s3.amazonaws.com/i/vhwzessijv0mr9zcfw2n.gif)

####Move from one window to another window

- Mac - **⌘ + Tab**
- Windows - **Alt + Tab**

![command-tab](https://thepracticaldev.s3.amazonaws.com/i/mkzlm5p9zxfuqhdl8qu7.gif)

####Split the code editor
- Mac - **⌘\\**
- Windows - **Ctrl\\**


![command-slash](https://thepracticaldev.s3.amazonaws.com/i/ngs7sp2ks0nj4qdgnzxj.gif)

####Go to line (e.g. 6, would take you to line 6 of your code file)
- Mac - **⇧ + G**
- Windows - **Ctrl + G**

![go-to-line](https://thepracticaldev.s3.amazonaws.com/i/szhsb8glcw0x3znwcmcy.gif)

####Delete an entire line

- Mac - **⇧ + ⌘ + K**
- Windows - **Ctrl + Shift + K**

![shift-command-k](https://thepracticaldev.s3.amazonaws.com/i/1a9e6w2sivirmegazaeq.gif)

####Move current line up/down
- Mac - **⌥ + ↓ / ⌥ + ↑**
- Windows - **Alt + ↓/↑**

![option-up](https://thepracticaldev.s3.amazonaws.com/i/9xv0ll74rf6x5aeo905w.gif)

####Create multiple cursors

- Mac - **⌥ + click**
- Windows - **Ctrl + click**

![option-click](https://thepracticaldev.s3.amazonaws.com/i/yv62xpp7e8xxy7kbsfez.gif)

####Opens the last tab you closed
- Mac - **⇧ +⌘ + T**
- Windows - **Ctrl + Shift + T**

![command-shift-t](https://thepracticaldev.s3.amazonaws.com/i/yoappe1jhnt3x9o85k1d.gif)

####Select each character right or left 
- Mac - **⇧ + ←/→**
- Windows - **Shift + ←/→**

![shift-right-left]
(https://thepracticaldev.s3.amazonaws.com/i/49rgh99bnptdaho7ka55.gif)

####Select each word right or left
- Mac - **⌥ + ←/→**
- Windows - **Alt + ←/→**

![select-words]
(https://thepracticaldev.s3.amazonaws.com/i/e3r60umk4pv2uldegnwk.gif)

####Redo last action
- Mac - **⇧ + ⌘ + Z**
- Windows - **Ctrl + Shift + Z**

![redo-action](https://thepracticaldev.s3.amazonaws.com/i/kxt8ou8ji8amsx3dngqb.gif)


These are all I can remember off the top of my head at the moment but if you have any other recommendations or useful shortcut suggestions please let me know.