To be an effective programmer, you need not only quick thinking, but also quick operation.
At work, there are always a few experienced programmers looking at the code, writing the code at a rapid speed of file switching, screen switching, keyword search, etc. Sometimes, you still understand what he did, but he has found the code snippets.
India’s teenagers are actually skilled workers in the workplace, and programmers are skilled in using ides in open Spaces.
Next, let’s take Webstorm as an example and talk about how to take advantage of the convenience IDE brings to programmers to increase productivity.
Keymap
Set keyboard shortcuts that fit your personal habits.
First, you need to sort out the IDE features you use most in your daily development. If you don’t know the shortcut keys, go to the Keymap to find, or change to the key you want. Here are some of my favorite shortcuts.
- Find in path:
necessary
. This is the most commonly used feature in current projects. Through keyword matching, regular expressions, pre-set search file scope, don’t know how in the projectQuickly search for what you want
orSearch for complete
Can seriously slow down your productivity. A good search configuration is therefore critical. - Enter the file name:
necessary
. Search for files by filename. It’s worth noting that thisDifferent from theFind everywhere
Which is the default in WebStormPress Shift twice
The function.Enter file name
Will automatically filter out by youmarkforlibrary root
andtest
The directory. Find file ratioFind everywhere
Smaller, but moreaccurate. - Pull: Pull code. Moving the mouse to click a button in the corner is a waste of time.
- Push: Push code.
- Find usages:
necessary
. This is used to find the file of a function call or class call. Not very common when writing JS because lookups are incomplete; But when writing Java, especially refactoring, it can be very useful. - Recent files:
necessary
. Open the list of recently opened files. It is convenient to switch files. - Back:
necessary
. Return to cursor position last time. When you modify a piece of code in a very long file and then scroll to the other pieces of code, you can use this shortcut to quickly switch between those pieces of code. - Forward:
necessary
. The cursor moves to the next location. - Add watches:
necessary
. When debugging code, we want to be able to directly view the value of some variables or monitor the change of some variables as they are executed step by step. We can just select the variable field in the code and passAdd watches
Quickly add to watches. Very useful. - Rename:
necessary
. Rename the file. Webstorm renames the file,You can’t just right-click a file and rename it, need to findrefactor > rename
Can. So setting up such a shortcut key can be very convenient. - Run:
necessary
. Common buttons, I won’t go into details. - Debug:
necessary
. Common buttons, I won’t go into details. Including every stepstep
Make use of all the shortcut keys. - Terminal:
necessary
. A quick breathterminal
Tool. Very useful. - Parameter info:
necessary
. Parameter prompt. If the declared function hasjsdoc
This parameter hint is even better where the function has been used.
In addition to these, there are many other practical quick functions, welcome to add.
Highlight
Configure code highlighting for high appearance levels.
Code highlights, you can use some other people’s color themes, and then modify them.
A theme with a high level of appearance will help developers better:
- Find the wrong spelling of English words.
- Undefined functions and variables are used.
- Distinguish between data types.
- Syntax specification and syntax simplification tips.
- The defined variable is not used. , etc.
Of course, there are problems that you can rely on a code quality check tool, but it is most effective to detect problems as they are written and prevent rework.
A gentleman is good at faking things. Improve your IDE. All progress begins with changing yourself.