Skip to content

tpai/vim-react-snips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Vim React Snippets

A Vim snippet library for React and it requires UltiSnips.

demo

Usage

Using vim-plug:

" React snippets library
Plug 'tpai/vim-react-snips'

" Ultisnips
Plug 'SirVer/ultisnips'

Define trigger keys:

let g:UltiSnipsExpandTrigger="<c-f>"
let g:UltiSnipsJumpForwardTrigger="<c-l>"
let g:UltiSnipsJumpBackwardTrigger="<c-b>"

In insert mode

react_c<C-f>

Then it will expand to

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

class Component extends PureComponent {
  static propTypes = {
  }
  static defaultProps = {
  }
  render() {
    return (
      <div>
        
      </div>
    );
  }
}

export default Component;

Releases

No releases published

Packages

No packages published