Social Snippet
1. Quick Start for the busy person
How to install social snippet You can install the social-snippet core system by typing the command as follow:
$ gem install social_snippet
...then, you should install the editor plugin (e.g. social_snippet.vim).
2. How it works
The Command-line Interface
The social_snippet gem provides the command-line interface to manage and use the snippet libraries. For example, you can search the libraries by running $ sspm search {keyword}
command, and install them by running $ sspm install {name}
command. The sspm-install
command can resolve dependencies between the libraries, so if the system found a missing required library on the installation of some library, it is also installed to the your system automatically.
@snip / @snippet annotation tags
To insert snippet texts, the social-snippet's core system replaces the annotated comment lines with the code specified on the comments.
Basic Syntax
(1) Before insert a snippet
// @snip < {repo-name} # {repo-version} : {file-path} >
(2) After insert a snippet
// @snippet < {repo-name} # {repo-version} : {file-path} > {the snippet source code}
Description
{repo-name}
This is the name of repository added in the social-snippet registry system. You can install the repository by running $ sspm install {repo-name} command.
Requirements
We recommend to use the latest versions of Ruby and Git.
- Ruby >= 1.9.3
- Git
Contributing
- Fork it ( https://github.com/[my-github-username]/social_snippet/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request