Keyboard Shortcuts to Make Your Developer Life Easier!
Tags: beginners, programming, tutorial, javascript
Published: 2023-02-13 02:52:59

Keyboard shortcuts are essential for efficiency in your day-to-day developer lifestyle! There are so many shortcuts that you might be thinking, "Man, there are too many to learn. How will I ever remember them all?!" You might also be wondering, "Why should I learn these things? Are they really that important?"

Yes - they are! Whether you're a software developer or a fry cook, it's important to be an efficient & proper worker. This is the difference between knowledge and wisdom - not only learning to do what you do, but also learning how to do it efficiently. Trust me, the more you code, the more useful (and easier) these shortcuts will be.

In this blog, I'll supply you both Mac & Windows versions of shortcuts so that whatever operating system you're using, you'll have the tools you need to code!

--------------------------------------------------------------

## Copy, Paste, and Cut

These three are your 'bread & butter' of your day-to-day coding use, whether you have to copy a portion of code to share, cut incorrect code, or paste the correct syntax.


_**Mac**_
```
Copy: ⌘(cmd) + C 
Paste: ⌘(cmd) + V 
Cut: ⌘(cmd) + X
```

 _**Windows**_
```
Copy: Ctrl + C 
Paste: Ctrl + V
Cut: Ctrl + X
```

## Undo 
Undo is truly a life saver! I can't tell you how many times I've typed variable names incorrectly or accidentally deleted a whole part of my code. It happens! 99.9% percent of the time, I utilize the undo shortcut instead of backspace/delete!


**_Mac_**
```
Undo: ⌘(cmd) + Z
```


**_Windows_**

```
Undo: Ctrl + Z
```

## Save
No one likes grabbing their mouse, clicking "file," clicking "save as," etc. In your coding domain, the save shortcut is your best friend, especially since you should be running your git commands as often as possible.

**_Mac_**

```
Save: ⌘(cmd) + S
```

**_Windows_**

```
Save: Ctrl + S
```

## Comment Out a Section
When navigating through code and trying to debug, commenting out a line or section is essential (or, if you're like me, you comment out a block to redo!)

**_Mac_**

```
Comment: ⌘(cmd) + /
```

**_Windows_**

```
Comment: Ctrl + /
```

## Search Within a File

You can use this shortcut in 2 different ways:
1. You can search in the sidebar/directory (in VSCode) for a specific word or name and it'll show you all instances of that word.
2. You can do it inside the document and pair it with our next shortcut to edit all instances of the word.

_**Mac**_
```
Directory: ⌘(cmd) + Shift +  F
Document: ⌘(cmd)+  F
```

_**Windows**_

```
Directory: Ctrl + Shift + F
Document: Ctrl + F
```
## Edit All Instances of a Word

As said previously, this shortcut can help you edit all instances of a word. You can re-type a different word in every instance of that previous word.

_**Mac**_

```
⌥(Option) + return
```
_**Windows**_

```
ALT + ENTER
```
## Take a Screenshot
Taking a screenshot is used for many different purposes. One of the number one situations I've used this shorting is to send code snippets to the help-desk. It's necessary to be able to share errors when you're stuck!
**_Mac_**

```
Screenshot: ⌘(cmd) + shift + 5(Mojave or later) || 4 & 3
```
**_Windows_**

```
Screenshot: PrtScn
```
## Highlight a Whole Line
Personally, I'm still learning how to implement these last shortcuts, but highlighting a whole line can be useful when you have to redo a line or code/pseudo code.
**_Mac_**

```
Highlight: ⌘(cmd) + shift + Right Arrow
Highlight: ⌘(cmd) + shift + Left Arrow
```
**_Windows_**

```
Shift + Down Arrow
```
## Highlight a Single Letter or More
While highlighting a whole line can be helpful, this shortcut may be more useful. Usually when we're coding, we don't want to erase strings and other containers. This shortcut will allow you to select a portion of a line.

**_Mac_** & **_Windows_**
```
Highlight: Shift + any arrow
```
--------------------------------------------------------------
While it may take a while to get the hang of these shortcuts, they will allow you to code without ever having to take your hands off the keyboard! They may not seem like a big deal, but shortcuts will be an asset to you on your journey to becoming a software developer. Although these are only a few of the shortcuts available, I hope they make your day-to-day coding experience better!