As a programmer, we would probably like to be focussed on our project. And if you are too focused such that your mouse feels like miles away then you must abide by some keyboard shortcuts which can save you some time.
In the article I will be covering the keyboard shortcut that I personally use which works nearly on all editors. I always believe that the faster I code, the faster the task is accomplished. I don’t know If I am the only person who feels like this.
1. Indent / Unindent lines
If you are a python developer like me, then dealing with indents are a headache, and if we are talking about 100’s of lines then it’s a nightmare. Fortunately, we have a solution, just select the lines of code you would like to indent and press Tab. If you want to un-intent, press shift + Tab.
2. Switchover applications
This shortcut is something that you will be using very often as you will need to google whenever you are struck. When you press Alt + Tab you will be shown multiple applications that are open as a widget. Keep pressing Alt + Tab continuously or use the arrow key to open the required application. You can press Alt + Shift + Tab.
3. Move cursor by word
While coding it’s most likely that we would have made a mistake and we keep pressing the left arrow to reach that word. Instead, press the ctrl + Arrow keys to reach the word. Similarly, if you want to select the previous words you can use the ctrl + shift + Arrow keys. If you want to delete those by words, then use ctrl + backspace.
4. Go to first or last letter of code
If you have a code that has thousands of lines and you want to go to the top or end of the code, then this surely is going to be useful.Press ctrl + home to go to the top and ctrl + end for bottom.
5. Open all previously closed tabs on google chrome
This particular shortcut is the first thing I do, to open all the browser tabs that I was using when I closed my laptop the day before. It saves us a lot of time and also allows us to continue with the same flow. Open google chrome and Press ctrl + shift + T.
6. Minimize all the tabs instantly
Suppose you have a file saved on your desktop and you want to minimize all the applications in order to reach it, then simply press windows + d.
7. Take instant screenshot
Press print screen (if not Fn + print screen) to copy the screenshot on your clipboard. So that you can paste wherever you need. If you want to save it directly on your pictures/screenshots directory press windows + print screen.
8. Toggle comments
You would probably have to temporarily comment certain codes in order to debug. In that case, just press Ctrl + /.
9. Format / beautify code
It is guaranteed that our first round of coding is never going to be properly formatted (except python developers). Luckily we can do that just by pressing Ctrl + K + D.
10. Lock screen
As a programmer it is very important for us to have some break. Just press windows + L and have a walk.
Other probably known and useful shortcuts
CTRL + s >> Save file
CTRL + S + Shift >> save all files
CTRL + c >> Copy
CTRL + v >> Paste
CTRL + f >> Search
CTRL + z >> Undo
CTRL + z +Shift >> Redo
CTRL + n >> new file
Conclusion
These are just the shortcuts that I came across and there are still more shortcuts that can be explored. The more shortcuts you know the more faster you code.