我爱编程

webstorm tutorial

2017-08-06  本文已影响20人  有些路啊得一个人走

note: its a window system version, may not useful in Mac OS

learning keyboards shortcuts

if you want to make webstorm to be a magic bar, you need to remember three things.

Is it enough? You need code more.

autocompletion skills

use libraries.jpg use libraries2.jpg

look at above the pictures, we download libraries from TypeScript community stubs and choose react to download. and then
get prompt when we type in react. it's awesome.

Formatting your code.

In window system, use ctrl+alt+l to format your code. Remember, you can to to file>sitting>code style to cinfig the
format rules.

code selection is a good thing.

in default, the hot key of "expend selection and shrink selection" is ctrl+w and ctrl+shift+w, but you can change this
configuration in 'setting>main menu>edit'. it will help you save your time if you using code selection expertly.

efficient reduce duplicated code

in your code, maybe will see following code:

var name = document.getElementById('id').nodeName
var value = document.getElementById('id').nodeValue

on the above, document.getElementById('id) occur twice, so you may want to simplified it. it is easy.
look at this gif:

ctrl+alt+v.gif
上一篇 下一篇

猜你喜欢

热点阅读