Webstorm common functions of the use of skills to share

Source: Internet
Author: User
Tags try catch

Webstorm is a JavaScript IDE developed by Jetbrain, which makes it easier to write code with ease.

This article is here to share some of the common features of the use of skills, hoping to help you better use this powerful JavaScript development tools.

Code editing
  • Code Jump: Ctrl + Left or CTRL + B, you can jump to the declaration position of a function or variable

  • Call Location: Alt + F7, find caller

  • Auto-Complete: It is better to modify the response time, Settings->editors->general->code completing:autopopup in 0.

  • Open file: Ctrl + Shift + N

  • Open class: Ctrl + N

  • Open function: Ctrl + F12

  • "Super" Open: Double-click Shift to search anywhere.

  • Copy whole line: Ctrl + D

  • Delete entire line: Ctrl + Y

  • Collapse Current Block: Ctrl + "-", collapse current block and sub-block: Ctrl + ALT + "-", Collapse all blocks: Ctrl + Shift + "-"

  • Expand, change the folding shortcut to "+"

  • Select: Ctrl + W, will gradually expand from small to large. For example, press once, select Word, press two times, select expression, three times, entire function

Refactoring
    • Rename: Shift + F6, modify the function name, variable name, file name, and modify all referenced locations at the same time.

    • Move files: F6, and modify the file's reference location, including HTML and JS files

    • Extract function: Ctrl + Alt + M, whole block code extracted into function

    • Extract variable: Ctrl + Alt + V, currently selected as variable

    • Move whole block code: Ctrl + Shift +↑↓

    • Package: Ctrl + Alt + T, outer package, such as if, try catch, etc.

Run & Debug

You can run & Debug NodeJS scripts directly, or you can execute server-side scripts

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143319021-1853972669. PNG "style=" border:0px; "/>

NPM

View-Tool Windows-NPM, you can open npm shortcut window

Here you can right-click Update

You can double-click the Execute NPM command

Automated Testing

You can launch a test framework in the IDE, such as karma.

You can automatically monitor code changes and run test scripts automatically.

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143403412-823807787. PNG "style=" border:0px; "/>

Version Control

Local code Control

VCS---Local history can list all code modifications after this webstorm startup.

Can integrate mainstream version control tools such as Git, mercurial, subversio, etc.

Complete process of pull, update, merge, Commit, push with two buttons, very convenient

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143540334-1035247013. PNG "style=" border:0px; "/>

Through the Branch management tool, you can easily switch branch work, while you can create, close, merge operations

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143553646-1469619697. PNG "style=" border:0px; "/>

Task

Integrates with the mainstream task platform to automatically pull tasks and create commit records automatically.

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143606490-144580768. PNG "style=" border:0px; "/>

shortcut Keys

With Ctrl + Shift + A, you can quickly retrieve the appropriate feature settings and shortcut keys by keyword.

Here is the shortcut key document

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143622318-1751139562. PNG "style=" border:0px; "/>

Formatting Code

Shortcut keys: Ctrl + Shift + L

Can be set to automatic format before commit

static Check

Can integrate mainstream static inspection tools

Here take ESLint as an example

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143646443-1444786529. PNG "style=" border:0px; "/>

In the IDE, you can start a static check on a single file or the entire project

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143705443-417450229. PNG "style=" border:0px; "/>

New Technology Support

Support the latest technology, such as TypeScript coffeescript the latest version, ANGULAR2, ES6 ES7, etc., integrated Gulp, Grunt and other tools.

Virtual Machine Parameters

If the project is large, it is highly recommended to use a 64-bit JRE and modify the virtual machine memory parameters to be as large as possible based on the native physical memory.

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143752568-1449455547. PNG "style=" border:0px; "/>

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/139239/201611/139239-20161129143955693-1813136970. PNG "style=" border:0px; "/>

This article only shares some of the basic operations commonly used by individuals, more webstorm features of the use of skills, look forward to exploring with you.


This article is from the "Grape City Control Technology Team Blog" blog, declined to reprint!

Webstorm common functions of the use of skills to share

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.