webstorm tutorial

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.

  • first, reading 'keymap reference' in help>keymap reference
  • second, remembering the short key ctrl shift a, and you can use command name to search command to instead of short keys
  • third,to download the plugin "key promoter", which will prompt you short keys when you use mouse to execute some actions.

Is it enough? You need code more.

autocompletion skills

  • skill 1: if you want to improve your autocompletion skill, you can use camel keys in 'document', for example:
    we type document.gebi to get document.getElementById, and type document.ceb to get document.createEventObject'.
  • skill 2: if we want to change document.getElementById to document.getElementsByTagName. we can type gebtn at the
    begin of getElementById, and then we will see autocompletion tips, we choose getElementsByTagName item and click tab
    rather than enter, getElementsByTagName will completely override getElementById.
  • skill 3: using alt /(alt + slash) to choose or autocomplete words which is base on exited word in the file.
  • skill 4: download libraries to autocompletion. using ctrl+alt+s to open setting panel, then choose input box
    and type libraries to search,
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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 近期回看了《舌尖上的中国》,这部以美食为题材的纪录片拍的真是棒极了。其中在第二集中主要讲的是“主食的故事”,这一集...
    穿过海的声音阅读 3,418评论 1 4
  • 裙带菜具有营养高、热量低的特点,容易达到保护皮肤、延缓衰老的功效,同时还是血液垃圾的天敌! 食材:裙带菜、芝麻、盐...
    凉菜厨房阅读 4,613评论 0 0
  • 软件需求是一个沟通问题 不要在项目开始时就做一套包罗万象的决策,我们要把各个决策分散在项目过程中。为此,我们要确保...
    tiancijiaren阅读 1,175评论 0 0
  • % 昨天晚上当老公读到我的第一篇简书感赏日记时,他问了句:什么是感赏?当时我也半懂不懂,只感觉是感激与赏识的合成...
    安然若婵阅读 2,118评论 2 4
  • 有些东西,可能在很早以前,就已经从内部开始溃烂,只是表面依然光鲜、欣欣向荣
    康雷阅读 1,400评论 0 1

友情链接更多精彩内容