Skip to content

nacq/vim-snipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-snipper

Needed vim configuration

File with the defined snippets.

let g:snippets_file = $HOME . "/dotfiles/vim-snippets.json"

Example snippets file

The file needs to be a json with the following structure:

{
  "ReactComponent": [
    "import React from 'react';",
    "",
    "type Props = {};",
    "",
    "function Component({}: Props) {}",
    "",
    "export default Component;"
  ],
  "ReduxSelector": [
    "import { State } from './State'",
    "",
    "export const selector = (state: State) => {};"
  ]
}

A config like the one above will expose two snippets commands VSReactComponent and VSReduxSelector, each one will generate the corresponding value.