Skip to content
Script for extracting snippets from source files into a snipmate snippet file
Ruby C++
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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) {
// end-snippet

This example generates the following snipmate file:

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


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.