Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Script for extracting snippets from source files into a snipmate snippet file

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 example.cpp
Octocat-spinner-32 snippet-maker.rb
README.md

Snippet Maker

The script extracts snippets from source code files to a snipmate file. Snippets in source code must be marked with "begin-snippet/end-snippet", as shown in the following C++ example:

// begin-snippet for 
// parameter n 
// parameter i  
// parameter body
for (int i = 0; i < n; ++i) {
    body
}
// end-snippet

This example generates the following snipmate file:

snippet for
    for (int ${2:i} = 0; $2 < ${1:n}; ++$2) {
        ${3:body}
    }

Usage

ruby snippet-maker.rb [options] <filenames>+

where [options] are:

--output, -o <s>:   Set destination file name
--version, -v:      Print version and exit
--help, -h:         Show this message
Something went wrong with that request. Please try again.