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 and it doesn't become a pain to maintain.
Snippets for:
- HTML, Pug, Jade
- CSS, Sass, Less, Stylus
- Javascript, Typescript, Javascriptreact, Typescriptreact
- Vue
- PHP
- Python
- C
- C++
- Rust
- Go
- Eruby
- Ruby
- Swift
- Java
- Fortran
- Lua
- LaTex
- Shell
- Markdown
- Sql
Usage
This collection of snippets should work with any plugin that supports loading vscode snippets. Like for example vim-vsnip and LuaSnip. For the moment being I recommend using vsnip since LuaSnip is still a bit of work in progress (refer to this link)
For setting up vim-vsnip refer to this link. Alternatively for setting up with LuaSnip see here and here
Install
Packer
use "rafamadriz/friendly-snippets"
use "hrsh7th/vim-vsnip"
Plug
Plug 'rafamadriz/friendly-snippets'
Plug 'hrsh7th/vim-vsnip'
Just a few examples of snippets in action
HTML
JS
CSS
Pyhton
C
Wiki
For for more details go to theTODO
- Complete the list for all snippets included in the Wiki, so it's easier for contributors to see which snippets are already included.
Credits
A good portion of the snippets have been forked from the following repositories: