Permalink
Browse files

vim: this is actually a fork of scrooloose's snippets, but you can't …

…tell

because git is being stupid
  • Loading branch information...
1 parent ff776ea commit 3af51a551941b3f2e525483a8bc2a05754424e98 @bhilburn committed Nov 14, 2012
Showing 794 changed files with 1,891 additions and 0 deletions.
View
@@ -0,0 +1,24 @@
+#require 'fileutils'
+#include FileUtils
+
+namespace :snippets_dir do
+ task :find do
+ vim_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin|msys|mingw32/ ? "vimfiles" : ".vim")
+ pathogen_dir = File.join(vim_dir, "bundle")
+ @snippets_dir = File.directory?(pathogen_dir) ? File.join(pathogen_dir, "snipmate", "snippets") : File.join(vim_dir, "snippets")
+ end
+
+ desc "Purge the contents of the vim snippets directory"
+ task :purge => ["snippets_dir:find"] do
+ rm_rf @snippets_dir, :verbose => true if File.directory? @snippets_dir
+ mkdir @snippets_dir, :verbose => true
+ end
+end
+
+desc "Copy the snippets directories into ~/.vim/snippets"
+task :deploy_local => ["snippets_dir:purge"] do
+ Dir.foreach(".") do |f|
+ cp_r f, @snippets_dir, :verbose => true if File.directory?(f) && f =~ /^[^\.]/
+ end
+ cp "support_functions.vim", @snippets_dir, :verbose => true
+end
@@ -0,0 +1 @@
+`strftime("%Y-%m-%d %H:%M:%S")`
@@ -0,0 +1 @@
+`strftime("%Y-%m-%d")`
@@ -0,0 +1 @@
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@@ -0,0 +1 @@
+`Snippet_Modeline()`
@@ -0,0 +1,29 @@
+<project name="PROJECT NAME" default="dist" basedir=".">
+ <description>
+ </description>
+
+ <!-- set global properties for this build -->
+ <property name="src" location="src"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="dist"/>
+
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init" description="compile the source " >
+ <javac srcdir="${src}" destdir="${build}"/>
+ </target>
+
+ <target name="dist" depends="compile" description="generate the distribution" >
+ <mkdir dir="${dist}/lib"/>
+ <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
+ </target>
+
+ <target name="clean"
+ description="clean up" >
+ <delete dir="${build}"/>
+ <delete dir="${dist}"/>
+ </target>
+</project>
@@ -0,0 +1,7 @@
+class ${1:`Filename('$1_t', 'name')`} {
+ public:
+ $1 (${2:arguments});
+ virtual ~$1 ();
+ private:
+ ${3:/* data */}
+};
@@ -0,0 +1,3 @@
+#ifndef $1
+#define ${1:SYMBOL} ${2:value}
+#endif${3}
@@ -0,0 +1,3 @@
+do {
+ ${2:/* code */}
+} while (${1:/* condition */});
@@ -0,0 +1,3 @@
+else {
+ ${1}
+}
@@ -0,0 +1,3 @@
+else if (${1:/* condition */}) {
+ ${2:/* code */}
+}
@@ -0,0 +1,3 @@
+for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
+ ${4:/* code */}
+}
@@ -0,0 +1,3 @@
+for (${1:i} = 0; ${2:$1 < 5}; $1${3:++}) {
+ ${4:/* code */}
+}
@@ -0,0 +1 @@
+fprintf(${1:stderr}, "${2:%s}\n"${3});${4}
@@ -0,0 +1,3 @@
+${1:void} ${2:function_name} (${3}) {
+ ${4:/* code */}
+}
@@ -0,0 +1,3 @@
+if (${1:/* condition */}) {
+ ${2:/* code */}
+}
@@ -0,0 +1 @@
+#include "${1:`Filename("$1.h")`}"${2}
@@ -0,0 +1 @@
+#include <${1:stdio}.h>${2}
@@ -0,0 +1,4 @@
+int main (int argc, char const* argv[]) {
+ ${1:/* code */}
+ return 0;
+}
@@ -0,0 +1 @@
+std::map<${1:key}, ${2:value}> map${3};
@@ -0,0 +1,3 @@
+namespace ${1:`Filename('', 'my')`} {
+ ${2}
+} /* $1 */
@@ -0,0 +1,6 @@
+#ifndef ${1:`toupper(Filename('', 'UNTITLED').'_'.system("/usr/bin/ruby -e 'print (rand * 2821109907455).round.to_s(36)'"))`}
+#define $1
+
+${2}
+
+#endif /* end of include guard: $1 */
@@ -0,0 +1 @@
+printf("${1:%s}\n"${2});${3}
@@ -0,0 +1,7 @@
+std::vector<char> v;
+if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
+ char buf[1024];
+ while (size_t len = fread(buf, 1, sizeof(buf), $2))
+ v.insert(v.end(), buf, buf + len);
+ fclose($2);
+}${3}
@@ -0,0 +1,3 @@
+struct ${1:`Filename('$1_t', 'name')`} {
+ ${2:/* data */}
+}${3: /* optional variable list */};${4}
View
@@ -0,0 +1 @@
+${1:/* condition */} ? ${2:a} : ${3:b}'
@@ -0,0 +1 @@
+typedef ${1:int} ${2:MyCustomType};
@@ -0,0 +1,3 @@
+typedef struct {
+ ${2:/* data */}
+} ${1:`Filename('$1_t', 'name')`};
@@ -0,0 +1 @@
+std::vector<${1:char}> v${2};
@@ -0,0 +1,3 @@
+while (${1:/* condition */}) {
+ ${2:/* code */}
+}
@@ -0,0 +1,3 @@
+#${1:id} {
+ ${2}
+}
@@ -0,0 +1 @@
+background:${6: #${1:DDD}} url($2) ${3:repeat/repeat-x/repeat-y/no-repeat} ${4:scroll/fixed} ${5:top left/top center/top right/center left/center center/center right/bottom left/bottom center/bottom right/x-% y-%/x-pos y-pos};$0
@@ -0,0 +1 @@
+background-attachment: ${1:scroll/fixed};$0
@@ -0,0 +1 @@
+background-color: #${1:DDD};$0
@@ -0,0 +1 @@
+background-color: ${1:red};$0
@@ -0,0 +1 @@
+background-color: rgb(${1:255},${2:255},${3:255});$0
@@ -0,0 +1 @@
+background-color: transparent;$0
@@ -0,0 +1 @@
+background-image: none;$0
@@ -0,0 +1 @@
+background-image: url($1);$0
@@ -0,0 +1 @@
+background-position: ${1:top left/top center/top right/center left/center center/center right/bottom left/bottom center/bottom right/x-% y-%/x-pos y-pos};$0
@@ -0,0 +1 @@
+background-repeat: ${1:repeat/repeat-x/repeat-y/no-repeat};$0
@@ -0,0 +1 @@
+border: ${1:1px} ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-color: ${1:999};$0
@@ -0,0 +1 @@
+border-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
@@ -0,0 +1 @@
+border-width: ${1:1px};$0
@@ -0,0 +1 @@
+border-bottom: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-bottom-color: #${1:999};$0
@@ -0,0 +1 @@
+border-bottom-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
@@ -0,0 +1 @@
+border-bottom-width: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-left: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-left-color: #${1:999};$0
@@ -0,0 +1 @@
+border-left-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
@@ -0,0 +1 @@
+border-left-width: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-right: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-right-color: #${1:999};$0
@@ -0,0 +1 @@
+border-right-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
@@ -0,0 +1 @@
+border-right-width: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-top: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1 @@
+border-top-color: #${1:999};$0
@@ -0,0 +1 @@
+border-top-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
@@ -0,0 +1 @@
+border-top-width: ${1:1}px ${2:solid} #${3:999};$0
@@ -0,0 +1,3 @@
+.${1:class} {
+ ${2:color: pink;}
+}
@@ -0,0 +1 @@
+clear: ${1:left/right/both/none};$0
@@ -0,0 +1 @@
+color: #${1:DDD};$0
@@ -0,0 +1 @@
+color: ${1:red};$0
@@ -0,0 +1 @@
+color: rgb(${1:255},${2:255},${3:255});$0
@@ -0,0 +1 @@
+cursor: ${1:default/auto/crosshair/pointer/move/*-resize/text/wait/help};$0
@@ -0,0 +1 @@
+cursor: url($1);$0
@@ -0,0 +1 @@
+direction: ${1:ltr|rtl};$0
@@ -0,0 +1 @@
+display: block;$0
@@ -0,0 +1 @@
+display: ${1:none/inline/block/list-item/run-in/compact/marker};$0
@@ -0,0 +1 @@
+display: inline;$0
@@ -0,0 +1 @@
+display: ${1:table/inline-table/table-row-group/table-header-group/table-footer-group/table-row/table-column-group/table-column/table-cell/table-caption};$0
@@ -0,0 +1 @@
+float: ${1:left/right/none};$0
@@ -0,0 +1 @@
+font: ${1:normal/italic/oblique} ${2:normal/small-caps} ${3:normal/bold} ${4:1em/1.5em} ${5:Arial}, ${6:sans-}serif;$0
@@ -0,0 +1 @@
+font-family: ${1:Arial, "MS Trebuchet"}, ${2:sans-}serif;$0
@@ -0,0 +1 @@
+font-size: ${1:100%};$0
@@ -0,0 +1 @@
+font: ${1:75%} ${2:"Lucida Grande", "Trebuchet MS", Verdana,} ${3:sans-}serif;$0
@@ -0,0 +1 @@
+font-style: ${1:normal/italic/oblique};$0
@@ -0,0 +1 @@
+font-variant: ${1:normal/small-caps};$0
@@ -0,0 +1 @@
+font-weight: ${1:normal/bold};$0
@@ -0,0 +1 @@
+${1:!important}
@@ -0,0 +1 @@
+letter-spacing: ${1}${2:em/px};$0
@@ -0,0 +1 @@
+letter-spacing: $1em;$0
@@ -0,0 +1 @@
+letter-spacing: $1px;$0
@@ -0,0 +1 @@
+list-style-image: url($1);$0
@@ -0,0 +1 @@
+list-style-position: ${1:inside/outside};$0
@@ -0,0 +1 @@
+list-style-type: ${1:cjk-ideographic/hiragana/katakana/hiragana-iroha/katakana-iroha};$0
@@ -0,0 +1 @@
+list-style-type: ${1:none/disc/circle/square};$0
@@ -0,0 +1 @@
+list-style-type: ${1:decimal/decimal-leading-zero/zero};$0
@@ -0,0 +1 @@
+list-style-type: ${1:hebrew/armenian/georgian};$0
@@ -0,0 +1 @@
+list-style: ${1:none/disc/circle/square/decimal/zero} ${2:inside/outside} url($3);$0
@@ -0,0 +1 @@
+list-style-type: ${1:lower-roman/upper-roman/lower-alpha/upper-alpha/lower-greek/lower-latin/upper-latin};$0
@@ -0,0 +1 @@
+margin: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
@@ -0,0 +1 @@
+margin-bottom: ${1:20px};$0
@@ -0,0 +1 @@
+margin-left: ${1:20px};$0
@@ -0,0 +1 @@
+margin: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
@@ -0,0 +1 @@
+margin: ${1:20px} ${2:0px};$0
@@ -0,0 +1 @@
+margin: ${1:20px};$0
@@ -0,0 +1 @@
+margin-bottom: ${1:20px};$0
@@ -0,0 +1 @@
+margin-left: ${1:20px};$0
@@ -0,0 +1 @@
+margin-right: ${1:20px};$0
@@ -0,0 +1 @@
+margin-top: ${1:20px};$0
@@ -0,0 +1 @@
+margin-right: ${1:20px};$0
@@ -0,0 +1 @@
+margin-top: ${1:20px};$0
@@ -0,0 +1 @@
+marker-offset: auto;$0
@@ -0,0 +1 @@
+marker-offset: ${1:10px};$0
@@ -0,0 +1,3 @@
+opacity: ${1:0.5};${100:
+}-moz-opacity: ${1:0.5};${100:
+}filter:alpha(opacity=${2:${1/(1?)0?\.(.*)/$1$2/}${1/^\d*\.\d\d+$|^\d*$|(^\d\.\d$)/(?1:0)/}});$0
@@ -0,0 +1 @@
+overflow: ${1:visible/hidden/scroll/auto};$0
@@ -0,0 +1 @@
+padding: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
@@ -0,0 +1 @@
+padding-bottom: ${1:20px};$0
@@ -0,0 +1 @@
+padding-left: ${1:20px};$0
@@ -0,0 +1 @@
+padding: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
@@ -0,0 +1 @@
+padding: ${1:20px} ${2:0px};$0
@@ -0,0 +1 @@
+padding: ${1:20px};$0
@@ -0,0 +1 @@
+padding-bottom: ${1:20px};$0
@@ -0,0 +1 @@
+padding-left: ${1:20px};$0
@@ -0,0 +1 @@
+padding-right: ${1:20px};$0
@@ -0,0 +1 @@
+padding-top: ${1:20px};$0
@@ -0,0 +1 @@
+padding-right: ${1:20px};$0
@@ -0,0 +1 @@
+padding-top: ${1:20px};$0
@@ -0,0 +1 @@
+position: ${1:static/relative/absolute/fixed};$0
@@ -0,0 +1,8 @@
+scrollbar-base-color: ${1:#CCCCCC};${2:
+scrollbar-arrow-color: ${3:#000000};
+scrollbar-track-color: ${4:#999999};
+scrollbar-3dlight-color: ${5:#EEEEEE};
+scrollbar-highlight-color: ${6:#FFFFFF};
+scrollbar-face-color: ${7:#CCCCCC};
+scrollbar-shadow-color: ${9:#999999};
+scrollbar-darkshadow-color: ${8:#666666};}
@@ -0,0 +1,3 @@
+${1:tag} {
+ ${2:color: pink;}
+}
@@ -0,0 +1 @@
+text-align: ${1:left/right/center/justify};$0
@@ -0,0 +1 @@
+text-decoration: ${1:none/underline/overline/line-through/blink};$0
@@ -0,0 +1 @@
+text-indent: ${1:10}px;$0
@@ -0,0 +1 @@
+text-shadow: #${1:DDD} ${2:10px} ${3:10px} ${4:2px};$0
@@ -0,0 +1 @@
+text-shadow: none;$0
@@ -0,0 +1 @@
+text-shadow: rgb(${1:255},${2:255},${3:255}) ${4:10px} ${5:10px} ${6:2px};$0
@@ -0,0 +1 @@
+text-transform: ${1:capitalize/uppercase/lowercase};$0
@@ -0,0 +1 @@
+text-transform: none;$0
@@ -0,0 +1 @@
+vertical-align: ${1:baseline/sub/super/top/text-top/middle/bottom/text-bottom/length/%};$0
@@ -0,0 +1 @@
+vertical-align: ${1:baseline/sub/super/top/text-top/middle/bottom/text-bottom/length/%};$0
@@ -0,0 +1 @@
+white-space: ${1:normal/pre/nowrap};$0
@@ -0,0 +1 @@
+word-spacing: ${1:10px};$0
@@ -0,0 +1 @@
+word-spacing: normal;$0
@@ -0,0 +1 @@
+z-index: $1;$0
@@ -0,0 +1,3 @@
+<% content_for :${1:yield_label_in_layout} do -%>
+ ${2}
+<% end -%>
@@ -0,0 +1 @@
+<%= collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+> %>
@@ -0,0 +1 @@
+<%= content_tag '${1:DIV}', ${2:content}${3:,options} -%>
@@ -0,0 +1 @@
+<% end -%>
@@ -0,0 +1,3 @@
+<% form_for @${1:model} do |f| -%>
+ ${2}
+<% end -%>
Oops, something went wrong.

0 comments on commit 3af51a5

Please sign in to comment.