In this blog, I'll reveal four VS Code editing tricks that can help you create code quicker and achieve long-term productivity as a programmer.
Trick 1 - Param Hints:
The first technique is related with IntelliSense.
You may find yourself in a file with no idea where to begin.
You can always use Ctrl + Space
to activate IntelliSense, which will give us a long list of global objects in this JavaScript file and then you can select the object you want.
When you don't know what arguments to pass into a function, it may be really frustrating. A handy method to know is to place your cursor within the parenthesis and then press ctrl + shift + space
to trigger parameter hints.
This will show you what arguments you can pass in the function.
Trick 2 - Moving Quickly:
Moving the mouse about trying to place the pointer in the proper location is one of the most time-consuming things a developer will do without even knowing it.
Spend some time editing your code without using the mouse. This is one of the most important keys to speedier coding.
One simple approach to increase your speed is to utilize the command palette by hitting Ctrl + P
followed by the @
sign to search for the code you need.
This is quite useful since it allows you to easily travel around the code.
Trick 3 - Fast Cut or Copy Trick:
By pressing ctrl+c
or ctrl+x
, you may copy the line of code you're presently on. There is no need to highlight the line with the mouse since it will copy the complete line.
Trick 4 - Line Move/Copy trick:
If you want to move a line somewhere nearby, simply press alt + ← ↑
.
To copy the same line of code over and over again, use shift + alt + ← ↑
The bottom line is to remember this:
Ctrl + Space
-> Suggestions
Ctrl + Shift + Space
-> Parameter hints
Ctrl + P
-> Command palette
ctrl + c
orctrl + x
-> copy entire the line of code
alt + ← ↑
-> move a line
shift + alt + ← ↑
-> copy line of code over and over again
Top comments (2)
These are good tips.
Thank you!!