webstorm 代码提示

来源:互联网 发布:淘宝刷销量在哪里找人 编辑:程序博客网 时间:2024/06/08 12:16

React Native代码智能提醒功能,github 插件Webstrom live template,
插件地址:[https://github.com/virtoolswebplayer/ReactNative-LiveTemplate]

ReactNative的代码模板,包括:

  • 组件名称
  • Api 名称
  • 所有StyleSheets属性
  • 调用ReactNative组件时, 首先 按下 command + J , 然后输入属性名的 首字母 如输入onP 自动提示 onPress, onPressIn, onPressOut, ….
下载方法:

首先大家可以把该项目下载或者如下命令clone下来:

git clone https://github.com/virtoolswebplayer/ReactNative-LiveTemplate
安装方法一(Windows和Mac都支持):
file -> import settings -> ReactNative.jar
安装方法二(该方法只是针对Mac):

将ReactNative.xml复制到 ~/Library/Preferences/WebStorm11/templates 重启 WebStrom

使用方法:

通用方法
直接输入组件 或 Api 名称的首字母, 比如想要 View ,只要输入 V自动提示代码里就会看到 View
StyleSheet属性提示
首先 按下 command + J , 然后输入属性名的 首字母
如: 输入 f ,会自动提示 fontSize,fontFamily,fontStyle…等等
楼主亲测使用效果图哦~
3

0 0
原创粉丝点击