Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A collection of snippets for snipmate (vim plugin) with a focus on bash, php, html and javascript

branch: master

This branch is 0 commits ahead and 0 commits behind master

Merge pull request #4 from Profpatsch/master

Explicit `#!2` and `#!3` snippets for python{2,3}
latest commit 52873ba809
Steve Francia authored
Octocat-spinner-32 snippets Added #! snippets for explicit python2 and python3 source code. March 14, 2013
Octocat-spinner-32 .gitignore Adding a .gitignore file March 17, 2009
Octocat-spinner-32 README.mkd Updating readme May 27, 2011
README.mkd

Description

A collection of snippets for use with snipmate

This repository is far more complete than the base snippets shipped with snipmate and is actively being contributed to.

There are over 50 contributors creating snippets for a variety of languages. I have done my best to pull together the best of them and package them together here. The original was created by Scrooloose.

There isn't an emphasis on a particular language, though it would seem most snippet users are ruby users, and this seems to be the most complete.

Approach

Each of the snippets is in a subirectory organized by filetype. Subsets are organized by filetype-set (and will also be loaded with filetype) Exceptions are made when a given snippet trigger contains a character that isn't filesystem friendly such as '*=>:' for example.

Installation

This is intended to replace the snippets that ship with snipmate as most (all) are reproduced here and will collide. I have a fork of snipmate that simply removes the original snippets, but is otherwise identical to the original snipmate

rm ~/.vim/snippets
git clone https://spf13@github.com/spf13/snipmate.vim.git
ln -s /path/to/repo ~/.vim/snippets

Alt. Installation

I have a complete vim configuration which includes both snipmate and these snipets as git submodules. It is available via github at spf13-vim.

It makes use of patogen to keep a very organized and clean .vim directory.

Snippets

snipMate.vim implements some of TextMate's snippets features in Vim. A snippet is a piece of often-typed text that you can insert into your document using a trigger word followed by a [tab].

Snippets can be defined in two ways. They can be in their own file, named after their trigger in 'snippets/[filetype]/[trigger].snippet', or they can be defined together in a 'snippets/[filetype].snippets' file.

Multiple Matches

To create a snippet with multiple matches using *.snippet files, simply place all the snippets in a subdirectory with the trigger name: 'snippets/[filetype]/[trigger]/[name].snippet'.

Something went wrong with that request. Please try again.