rafamadriz/friendly-snippets

github github
snippets plugin
star 212
stars
alert-circle 11
open issues
users 8
subscribers
git-branch 71
forks
CREATED

2021-03-27

UPDATED

13 days ago

packer

require('packer').startup(function()
  use 'rafamadriz/friendly-snippets'
end)

paq

require "paq" { 
  'rafamadriz/friendly-snippets'
}

Friendly Snippets

Snippets collection for a set of different programming languages for faster development.

Goal

The only goal is to have one community driven repository for all kinds of snippets in all programming languages, this way you can have it all in one place.

Contributing

You can commit all kinds of useful snippets that you may have for personal use, but first make sure that the snippets don't already exist, so we don't have duplicates.

Snippets for:

  • HTML, Pug, Jade
  • CSS, Sass, Less, Stylus
  • JavaScript, Typescript, Javascriptreact, Typescriptreact
  • Vue
  • PHP
  • Python
  • C
  • C++
  • C#
  • ReScript
  • Rust
  • Go
  • GDScript (Godot)
  • Haskell
  • Eruby
  • Ruby
  • Swift
  • Java
  • Fortran
  • Lua
  • LaTex
  • Shell
  • Markdown
  • Sql
  • Rails
  • Elixir
  • Fennel
  • Cobol
  • Jekyll(Markdown)
  • Kotlin
  • R(Markdown)

Usage

This collection of snippets should work with any plugin that supports loading vscode snippets. Like for example:

Install

Use your plugin manager of choice, e.g.

-- Packer
use "rafamadriz/friendly-snippets"

-- Plug
Plug 'rafamadriz/friendly-snippets'

-- If you're using coc.nvim, you can use:
CocInstall https://github.com/rafamadriz/friendly-snippets@main

HTML

HTML gif

JS

JS gif

NOTE: Using nvim-compe with vim-vsnip on the videos.

For for more details go to the Wiki

TODO

  • Add all included snippets to the Wiki.

Credits

A good portion of the snippets have been forked from the following repositories: