1
1
# Vim React Snippets
2
2
3
- A Vim snippet library for React.
3
+ A Vim snippet library for React in ES6 .
4
4
5
5
Requires [ UltiSnips] ( https://github.com/SirVer/ultisnips ) .
6
6
@@ -16,3 +16,39 @@ Plug 'epilande/vim-react-snippets'
16
16
Plug 'SirVer/ultisnips'
17
17
```
18
18
19
+ ## Snippets
20
+
21
+ | Trigger | Content |
22
+ | -------: | ------- |
23
+ | ` rcc→ ` | class component skeleton |
24
+ | ` rcc→ ` | legacy component skeleton |
25
+ | ` cdm→ ` | ` componentDidMount() {...} ` |
26
+ | ` cdup→ ` | ` componentDidUpdate(prevProps, prevState) {...} ` |
27
+ | ` cwm→ ` | ` componentWillMount() {...} ` |
28
+ | ` cwr→ ` | ` componentWillReceiveProps(nextProps) {...} ` |
29
+ | ` cwun→ ` | ` componentWillUnmount() {...} ` |
30
+ | ` cwup→ ` | ` componentWillUpdate(nextProps, nextState) {...} ` |
31
+ | ` fdn→ ` | ` React.findDOMNode(...) ` |
32
+ | ` gdp→ ` | ` getDefaultProps() {...} ` |
33
+ | ` gis→ ` | ` getInitialState() {...} ` |
34
+ | ` ren→ ` | ` render() {...} ` |
35
+ | ` sst→ ` | ` this.setState(...) ` |
36
+ | ` scu→ ` | ` shouldComponentUpdate(nextProps, nextState) {...} ` |
37
+ | ` props→ ` | ` this.props ` |
38
+ | ` state→ ` | ` this.state ` |
39
+ | ` pt→ ` | ` propTypes { ... } ` |
40
+ | ` pta→ ` | ` PropTypes.arrayOf ` |
41
+ | ` ptai→ ` | ` PropTypes.arrayOf (Instances) ` |
42
+ | ` ptb→ ` | ` PropTypes.bool ` |
43
+ | ` pte→ ` | ` PropTypes.element ` |
44
+ | ` ptf→ ` | ` PropTypes.func ` |
45
+ | ` pti→ ` | ` PropTypes.instanceOf ` |
46
+ | ` ptn→ ` | ` PropTypes.number ` |
47
+ | ` ptn→ ` | ` PropTypes.node ` |
48
+ | ` pto→ ` | ` PropTypes.object ` |
49
+ | ` ptof→ ` | ` PropTypes.oneOf (Enum) ` |
50
+ | ` ptof→ ` | ` PropTypes.objectOf ` |
51
+ | ` ptoft→ ` | ` PropTypes.oneOfType (Union) ` |
52
+ | ` pts→ ` | ` PropTypes.string ` |
53
+ | ` ptsp→ ` | ` PropTypes.shape ` |
54
+
0 commit comments