• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vim version of the snippets from jgebhardt/sublime-react

vim-react-snippets

A set of snippets for Vim to work with Facebook's React library. This fork change the snippet syntax to ES6. Remove semicolon and comma. I also remove snippets related to react-classset as it is deprecated now.

Require UltiSnips. I only update the UltiSnips version. Pull requests for vim-snipmate version are welcome.

Installation

Use your preferred Vim plugin installation method. For me, I like vim-plug. If you also using vim-plug, put the following into your .vimrc.

Plug 'SirVer/ultisnips'

" Currently, es6 version of snippets is available in es6 branch only
Plug 'letientai299/vim-react-snippets', { 'branch': 'es6' }

Plug 'honza/vim-snippets' "optional

Usage

Within any Javascript or JSX file, you should be able to do the following:

(in insert mode)

gdp<Tab>

expanding to

getDefaultProps() {
    return {

    };
},

Another example:

rcx<Tab>

Expanding to

class ClassName extends React.Component {
  render(){
    return (

    )
  }
}

And a bunch of others!

Check ./UltiSnips/javascript.snippets to see the full list.

More Repositories

1

string-matching-visualization

Visualizing Brute Force, KMP, and Boyer-Moore
Clojure
97
star
2

vim-pico8-syntax

Syntax file for Pico-8
Vim Script
61
star
3

communic8

Bridge between JavaScript and PICO-8
JavaScript
18
star
4

nulldb

Rust
12
star
5

reconstruction-database

The largest collection of reconstructions on the internet
Ruby
11
star
6

datadriven

Rust
9
star
7

bifocal

Minimal abstract lens library for JavaScript
JavaScript
9
star
8

last-layer-algs

code for @lastlayeralgs
Rust
6
star
9

triangle-counter

A very non-generic implementation of a worst-case-optimal join
Rust
6
star
10

vim-textobj-reactprop

A vim text object for a React prop
Vim Script
5
star
11

joinorder

join ordering
Go
3
star
12

redo-log

Rust
3
star
13

cube-simian

Heise cube sim keys helper library
JavaScript
2
star
14

bumblebee

bare bones benchmarking buddy
Python
2
star
15

reforth

Forth interpreter in Ruby
Ruby
2
star
16

greybox

Simple testing against a CLI black box
Ruby
2
star
17

sol

The sunny solver
JavaScript
2
star
18

misc-vim

random vim garbage that doesn't deserve a plugin
Vim Script
2
star
19

sparkles

Coloured terminal output for Pixie
Python
2
star
20

naiad

JavaScript
1
star
21

ramsdel

RaMSDeL is a Random Move Scrambler Definition Language
Ruby
1
star
22

vim-relax

React tools for Vim
Vim Script
1
star
23

js-isolation-algorithms

framework for testing toy implementations of various isolation algorithms
JavaScript
1
star
24

babyflow

Rust
1
star
25

cycleset

Exciting linear algebra and graph theory game
PureScript
1
star
26

babydb

Rust
1
star
27

sqlite3-pixie

Sqlite bindings for Pixie
Python
1
star
28

dotfiles

dotfiles
Vim Script
1
star
29

alg-sorter

cljs remake of the alg-lister
Clojure
1
star
30

cubid

cube representation that sucks
JavaScript
1
star