There are times when you might feel like reaching for the mouse to execute a certain task. But we all know that shifting our hand to and fro from the mouse reduces our productivity. So,
Here are 10 keyboard shortcuts that will help you to speed up your coding process 🧵
These shortcuts work with a majority of code editors and IDEs like VS Code, Atom, Sublime etc. If these doesn't work for you, make sure to check the settings of you editor.
Let's Begin 👇
You might be aware about Ctrl+C/X/V but there's a trick to it, if you don't select any portion in the line, your editor will copy/cut/paste the whole line including the line break.
Comments are extremely handy for us, but instead of going to each and every line individually and commenting it, just highlight whatever lines you want commented and then hit
Ctrl + /
This command will comment and uncomment the entire line
Navigating through a project can get hard, especially when the project is pretty big. You can just use
Ctrl + P
to search for any file in your whole project.
Searching for a keyword inside a file can be done using
Ctrl + F and then pressing Enter will let you navigate through the keywords
To search in the whole project,
Ctrl + Shift + F is used.
Select the code block that you need to indent and then press the Tab key to indent the whole code block.
Similarly, to un-indent the code block, select it and press Shift + Tab
This might not be the most useful shortcut in bigger projects but you can create new files using
Ctrl + N
Usually, when we have to create a new line, we place our cursor at the end of the line and press Enter, but pressing
Ctrl + Enter
will create a new line just below the line where your cursor is present.
Ctrl + Arrow Key will allow you to navigate across a whole word at a time as compared to just a character
Ctrl + Backspace will allow you to delete a whole word at a time
Holding down Shift key and pressing allow keys will allow you to highlight characters.
Shift + Ctrl + Arrow keys will allow you to highlight a whole word at a time.
Ctrl + S -> Save the file
Ctrl + A -> Select All
Ctrl + Z -> Undo
Ctrl + Y -> Redo
These are all the shortcuts you'll need to speed up your coding. Initially, it might be a little bit difficult to use them regularly.
You need to use these shortcuts consciously and in no time they'll get into your habit without you even knowing.