How would you continue improving as a software developer? A few recommendations are substantial regardless of your experience level, yet regularly the counsel will rely upon where you are in your profession.
In case you’re a beginner, the best counsel is to just get familiar with your language, systems, and framework. But if you are an experienced software developer, you should continuously find a way to improve your code methodology, readability, performance etc.
Today I will try to cover some of good tips and tricks. If you’re an experienced software developer then some of you might already using.
You can also checkout my articles of Angular.
1. Copy Line Up/Down
When you want to clone line. This situation often occurs when you need to copy same list item multiple times. You can clone multiple lines also. Instead of doing copy/paste entire use below shortcut.
- On Windows: Shift + Alt + Up/Down
- On Mac: Shift + Option + Up/Down
- On Ubuntu: Ctrl + Shift + Alt + Up/Down
2. Move Line Up/Down
Move line is changing position of code execution of particular line. Instead of cut + paste simply using move line saves lots of time.
- On Windows and Ubuntu: Alt + Up/Down
- On Mac: Option + Up/Down
3. Delete Line
Delete single or multiple line with below shortcut.
- On Windows: Ctrl + x
- On Mac: Command + x
- On Ubuntu: Ctrl + x
4. Save all
This shortcut saves your as well as compiler time. Angular is continuously detecting file save, so if you saving single files it will start compiling every time. Instead save all will immediately saves all files that will not put load on compiler.
- On Windows: Ctrl + K S
- On Mac: Option + Command + S
- On Ubuntu: Ctrl + Alt + S
5. Code Formatting
Code will format based on the language. If you want support for vast amount of language you can add Beautify plugin.
- On Windows: Shift + Alt + F
- On Mac: Shift + Option + F
- On Ubuntu: Ctrl + Shift + I
6. Write in multiple line
You can activate by following shortcut.
- Alt + Left Click
7. Emmet abbreviations and snippets
Emmet is built in support into Visual Studio Code. This is bit advance as you need to understand this in deep. Emmet is useful to create dynamic snippets using predefined syntax.
As you can see below example. It created table, table cell, div with class and text.
- > create child
- .classname adds class to tag
- #id adds id to tag
- * will create multiple copies of same tag.
- () you can wrap it up long abbreviations
- + will create parallel object
- |c adds comments around important tags. By default, “important tags” are those tags with id and/or class attribute.
Above are the common which we are using in day to day use. You can read more details on official document.
8. Deleting Previous Word
Instead of keep pressing delete key until work delete, shortcut is helpful to remove complete word.
- On Windows: Ctrl + backspace
- On Mac: Command + delete
- On Ubuntu: Ctrl + backspace
9. Rename Elements
Rename variable and method easily with updating their reference as well. Below is shortcut.
10. Navigate to line
Quick navigation to particular line of file.
- Ctrl + g
With shortcuts coding gets easier. You can customize your own shortcuts based on choice.
- File > Preferences > Keyboard Shortcuts