Home >Development Tools >webstorm >Some related techniques for using WebStorm
This article brings you some related skills about using WebStorm. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
There are more complete shortcut keys below, and you will gradually become familiar with it...
WebStorm mashup svn
WebStorm mashup nodeJS
Use less and uglify -js as an example
How to use npm to download modules in root
A brief introduction to webstorm
Official website address: http://www.jetbrains.com/webstorm /features/index.html
If you want to do your job well, you must first sharpen your tools, as the title states. I saw an article on the Internet introducing webstrom, and I felt that the function is really powerful. I also know why the files uploaded to github by Alibaba's front-end have an .idea file. (It is said that Taobao internally recommends using webstrom when writing js)
We can understand that IDE integrates many functions you want, or functions you don't want. In other words, it is an editor with many plug-ins installed, so so far, I don’t think it is necessary to install any plug-ins for it.
Then let’s introduce the special features of webstrom:
##WebStorm is a commercial JavaScript development tool launched by JetBrainsBenefits: After eliminating the need for ctrl s, when combined with Firefox's vim, you can basically see the results page without moving the mouse.
Disadvantages: There is no previous * mark, and it will be stored immediately in case of keyboard misoperation.
Benefits: As long as webstorm is not closed, your file can be returned to the previous operation at any time (this is why ctrl in webstorm y is the reason for deleting a row).
Disadvantages: These historical records will be gone after webstorm is closed and restarted; another disadvantage is that the resulting memory consumption will inevitably be relatively large.
Benefits: Equivalent to local svn.
Disadvantages: Memory consumption must also be relatively large.
File -> settings -> Editor -> colors&fonts -> scheme name.Theme download address
File -> Settings->General remove Reopen last project on startup.
File -> Settings->Appearance, check Override default fonts by (not recommended), set Name: NSimSun, Size: 12
File -> Settings->Editor, check "Show line numbers" to display the line numbers
File -> settings -> Editor "Use Soft Wraps in editor" Check the hook, and the code will automatically wrap.
File -> Settings->Editor "Allow placement of caret after end of line" just uncheck it.
File -> Settings->Keymap, then double-click the function you want to modify the shortcut, a prompt box will appear, follow the prompts
Replace with the shortcut keys you are familiar with the editor:
File ->Settings->Keymap, which supports mainstream IDEs such as Visual Studio, Eclipse, and NetBeans.
javascript class library prompt.
File -> settings -> Javascript -> Libraries -> Then select the javascript class library you often use in the list, and finally Download and Install is ok.
When developing js, I found that ctrl return is required to select the candidate option:
File -> Setting -> Editor -> Code Completion -> Preselect the first suggestion: "Smart" to "Always"
js prompt is relatively slow
File -> Code Completion -> Autopopup in and change 1000 to 0
git configuration:
File -> settings -> Editor -> github, go in and change the github account. If you don’t have git, you don’t need it.
Plug-in installation:
File - >plugins, then select the powerful plug-ins and install them. (The "css-X-fire" plug-in is used when using firebug to modify css properties, the css code in the editor will also change.)
Update later
When the project directory is very large , some subdirectories are often opened, but the level is very deep. At this time, you can add the directory to your favorites. After the addition is successful, there will be a "Favorites" menu on the left
In addition to the project page on the left, where you can select a directory, there is a directory similar to the website breadcrumb navigation under the top menu that can also achieve the same function. Clicking on each directory will bring up a drop-down menu to display the subdirectories under it, which is very practical.
Comments will appear if they match the format. If it is a js file, it is the functions and objects of the js class; if it is a css file, it is a summary of the css file; if it is an html file, it is the structure diagram of the node. These are just for the convenience of viewing the structure of the code.
Add todo comments to the code and this interface will appear
Right-click the file on the code tab, and then right-> spilt vertically (left and right screens) or split horizontally (upper and lower screens)
A good way to retrieve code
Right-click any area of the code interface, select git -> compare with and then select the repository to be compared.
Editing editing related shortcut keys
Basic code completion (the name of any class, method or variable) Basic code completion (any class, function or variable name), change to Alt S
Complete statement Complete the current Statement
Parameter info (within method call arguments) Parameter information includes method call parameters
Brief Info Simple information
Show description of error or warning at caret Show the error or warning at the cursor position
Generate code... (Getters, Setters, Constructors) Create a new file or generate code,...Constructor function can create getter and setter methods for any field in the class
Override methods Override methods
Implement methods Implementation methods
Surround with… (if, else, try, catch, for, etc) Use * to surround the selected line of code, (* includes if, while, try catch, etc.)
Comment/uncomment with line comment line comment/uncomment line
Comment/uncomment with block comment block comment/uncomment block
Select successively increasing code blocks Select code blocks, usually incremental selection
Decrease current selection to previous State Return to the previous shortcut key, decrement selection code
Context info Context information
Show intention actions and quick-fixes Intention actions, quick results
Reformat code Format the code according to the template format
Indent/unindent selected lines Indent/Unindent selected lines
Cut current line or selected block to clipboard Cut the current line or selected block to the clipboard
Copy current line or selected block to chipboard Copy the current line or Selected code block to clipboard
Paste from clipboard Paste the contents of the clipboard
Ctrl Shift V
Paste from recent buffers Paste the latest content in the buffer
Ctrl D
Duplicate current line or selected block Copy the current Line or selected code block
Ctrl Y
Delete line at caret Delete the line at the cursor position
Ctrl Shift J
Smart line join (HTML and JavaScript only) Join smart line (HTML and JavaScript)
Ctrl Enter
Smart line split (HTML and JavaScript only) Split smart line (HTML and JavaScript)
Shift Enter
Start new line Start a new line
Ctrl Shift U
Toggle case for word at caret or selected block Case conversion at the cursor position
Ctrl Shift ]/[
Select till code block end/start Select till the end/start of the code block
Ctrl Delete
Delete to word end Delete text end
Ctrl Backspace
Delete to word start Delete text start
Ctrl NumPad /-
Expand/collapse code block Expand/collapse code block
Ctrl Shift NumPad
Expand all Expand all
Ctrl Shift NumPad-
Collapse Collapse all
Ctrl F4
Close active editor tab Close active editor tab
Search/replaceSearch/replace related shortcut keys
Ctrl F
Find Quickly find the code in the current file
Ctrl Shift F
Find in path Find the path in the specified file
F3
Find next Find the next one
Shift F3
Find previous Find the previous
Ctrl R
Replace Code replacement in the current file
Ctrl Shift R
Replace in path Batch replacement of codes in specified files
Usage Search Search related shortcut keys
Alt F7/Ctrl F7
Find usages/Find usages in file Find usage/Find usage in file
Ctrl Shift F7
Highlight usages in file
Ctrl Alt F7
Show usages Show usages
Running running
Select configuration and run Select the architecture and run
Select configuration and debug Select the architecture and patch the vulnerability
Run Run
Debug Fix the vulnerability
Run context configuration from editor Run from editor Content structure
Run command line Run command line
Ctrl Shift I
Open quick definition lookup Open quick definition lookup
Ctrl U
Go to super-method/super-class Jump Go to method/super class
Alt Up/Down
Go to previous/next method Quickly move position between methods
Move to code block end/start Jump to the end/start of the coding block
File structure popup File structure popup
Type hierarchy Type hierarchy
Call hierarchy Call hierarchy
Next/previous highlighted error Jump to the next/previous error, highlight the error or warning to quickly locate it, use this shortcut key to quickly jump between erroneous statements.
Edit source/ View source Edit source code/View source code
Show navigation bar Display navigation bar
Toggle bookmark switch mark
Toggle bookmark with mnemonic Use memory switch mark
Go to numbered bookmark Jump to the numbered bookmark
Show bookmark Show mark
Refactoring Refactoring related shortcut keys
Copy copy
Move Move
Safe Delete Safe Delete
Rename Rename
Inline Variable Embed variable
The above is the detailed content of Some related techniques for using WebStorm. For more information, please follow other related articles on the PHP Chinese website!