SublimeText React ES6 插件备忘

前端之家收集整理的这篇文章主要介绍了SublimeText React ES6 插件备忘前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_403_0@Font
@H_403_0@Emmet

提高编写 html,css... 效率。

@H_403_0@View In Browser

在浏览器打开页面

@H_403_0@CodeFormatter

代码格式化,使用这个插件我是拒绝的。。。

  1. git clone https://github.com/akalongman/sublimetext-codeformatter.git

具体查看:
C:\\Users\your username\\AppData\\Roaming\\Sublime Text 3\\Packages\\CodeFormatter\\CodeFormatter.sublime-settings

Support javascript (babel)

Package Setings -> CodeFormatter -> Setings - User add:

  1. {
  2. "codeformatter_js_options": {
  3. "Syntaxes": "javascript (babel)",}
  4. }
@H_403_0@SublimeLinter

代码检测

  1. npm install eslint babel-eslint -g
  2.  
  3. install SublimeLinter,SublimeLinter-contrib-eslint
@H_403_0@SCSS & LESS

sass,less.

@H_403_0@HTMLAttributes @H_403_0@BracketHighlighter @H_403_0@FileHeader

自动更新保存时间,文件模板。

  1. /*
  2. * @Author: mgdev
  3. * @Date: 2016-06-20 14:20:12
  4. * @Last Modified by: mgdev
  5. * @Last Modified time: 2016-06-20 14:20:12
  6. */
@H_403_0@TrailingSpaces

高亮空格,专治强迫症。

@H_403_0@LiveReload

浏览器中实时预览文件

  1. cd E:\Program Files (x86)\Sublime Text 3\Data\Packages
  2. git clone https://github.com/Grafikart/ST3-LiveReload.git LiveReload

配置1:

  1. Preference>Package Settings>LiveReload>Settings User
  2.  
  3. {
  4. "enabled_plugins": [
  5. "SimpleReloadPlugin","SimpleRefresh"
  6. ]
  7. }

配置2:

  1. ctrl+shift+p
  2. LiveReload: Enable/disable plugins
  3. Enable - SimpleReload

配置好后,点 Chrome 网上应用店 安装 LiveReload.

@H_403_0@ES6-Toolkit

ES6 的各种片段。

@H_403_0@ReactJS Snippets

React语法高亮、代码提示...

  1. cdm componentDidMount: fn() { ... }
  2. cdup componentDidUpdate: fn(pp,ps) { ... }
  3. cs var cx = React.addons.classSet;
  4. cwm componentWillMount: fn() { ... }
  5. cwr componentWillReceiveProps: fn(np) { ... }
  6. cwu componentWillUpdate: fn(np,ns) { ... }
  7. cwun componentWillUnmount: fn() { ... }
  8. cx cx({ ... })
  9. fdn React.findDOMNode(...)
  10. fup forceUpdate(...)
  11. gdp getDefaultProps: fn() { return {...} }
  12. gis getInitialState: fn() { return {...} }
  13. ism isMounted()
  14. props this.props.
  15. pt propTypes { ... }
  16. rcc component skeleton
  17. refs this.refs.
  18. ren render: fn() { return ... }
  19. scu shouldComponentUpdate: fn(np,ns) { ... }
  20. sst this.setState({ ... })
  21. state this.state.
@H_403_0@React ES6 Snippets

ES6 Snippets,代码提示

@H_403_0@Babel

es6/es2015、JSX代码高亮

设置①:view > Syntax > Babel > JavaScript (Babel)
设置②:点击编辑器右下角 > Babel > JavaScript (Babel)

@H_403_0@Babel Snippets @H_403_0@React and React Router Snippets

Joe Maddalone 自己用的插件,可能是太好用了就分享出来了。不过确实好用!

React-Router

  1. Trigger Description
  2. link react-router Link
  3. iroute Router.IndexRoute
  4. ilink Router.IndexLink
  5. redirect react-router Redirect
  6. imrr import react-router
  7. route Router.Route
  8. router Router.Route

Trigger Description

  1. onbl onBlur
  2. onch onChange
  3. oncl onClick
  4. oncm onContextMenu
  5. onco onCopy
  6. onct onCut
  7. ondc onDoubleClick
  8. onde onDragEnd
  9. onden onDragEnter
  10. ondex onDragExit
  11. ondl onDragLeave
  12. ondo onDragOver
  13. onds onDragStart
  14. onfo onFocus
  15. ondr onDrop
  16. onin onInput
  17. onkd onKeyDown
  18. onkp onKeyPress
  19. onku onKeyUp
  20. onmd onMouseDown
  1. onme onMouseEnter
  2. onmm onMouseMove
  3. onml onMouseLeave
  4. onmo onMouSEOut
  5. onmov onMouSEOver
  6. onmu onMouseUp
  7. onpa onPaste
  8. onsc onScroll
  9. onsu onSubmit
  10. ontc onTouchCancel
  11. onte onTouchEnd
  12. ontm onTouchMove
  13. onts onTouchStart
  14. rwc React withContext
  15. onwh onWheel
@H_403_0@Theme

Ayu

[ 使用中... ] 也是赞,主要是看得舒服,颜值还高,完美。

  1. {
  2. "color_scheme": "Packages/ayu/ayu-mirage.tmTheme","font_face": "Roboto Mono","font_size": 12,"theme": "ayu-mirage.sublime-theme","ui_separator": true,// separators between panels
  3. "ui_font_size_small": true,// smaller UI font size(sidebar,statusbar etc)
  4. "ui_big_tabs": true,// increased tab height
  5. "ui_fix_tab_labels": true // to fix tab labels if they look not right
  6. }

Boxy Theme

猜你在找的React相关文章