Commits

paradoxiology committed ee590b8

Add vim configurations

  • Participants

Comments (0)

Files changed (64)

vim/UltiSnips/README

+This directory contains the main scripts that come bundled with UltiSnips.
+
+Standing On The Shoulders of Giants
+===================================
+
+The snippets have been collected from various other project which I want to
+express my gratitude for. My main source for inspiration where the following
+two projects:
+
+   TextMate: http://svn.textmate.org/trunk/Bundles/
+   SnipMate: http://code.google.com/p/snipmate/
+
+All snippets from those sources were copied and cleaned up, so that they are 
+  - not using shell script, only python (so they are cross platform compatible)
+  - not using any feature that UltiSnips doesn't offer
+
+UltiSnips has seen contributions by various individuals. Those contributions
+have been merged into this collection seamlessly and without further comments.
+
+-- vim:ft=rst:nospell:
+

vim/UltiSnips/all.snippets

+# This file contains snippets that are always defined. I personally
+# have snippets for signatures and often needed texts
+
+##############
+# NICE BOXES #
+##############
+global !p
+import string, vim
+
+""" Maps a filetype to comment format used for boxes.
+Automatically filled during usage"""
+_commentDict = { }
+
+def _parse_comments(s):
+    """ Parses vim's comments option to extract comment format """
+    i = iter(s.split(","))
+
+    rv = []
+    try:
+        while True:
+            # get the flags and text of a comment part
+            flags,text = i.next().split(':', 1)
+
+            if len(flags) == 0:
+                if len(text) == 1:
+                    rv.append((text,text,text, ""))
+            # parse 3-part comment, but ignore those with O flag
+            elif flags[0] == 's' and 'O' not in flags:
+                ctriple = []
+                indent = ""
+
+                if flags[-1] in string.digits:
+                    indent = " " * int(flags[-1])
+                ctriple.append(text)
+
+                flags,text = i.next().split(':', 1)
+                assert(flags[0] == 'm')
+                ctriple.append(text)
+
+                flags,text = i.next().split(':', 1)
+                assert(flags[0] == 'e')
+                ctriple.append(text)
+                ctriple.append(indent)
+
+                rv.append(ctriple)
+
+            elif flags[0] == 'b':
+                if len(text) == 1:
+                    rv.insert(0, (text,text,text, ""))
+
+    except StopIteration:
+       return rv
+
+def _get_comment_format():
+    """ Returns a 4-element tuple representing the comment format for
+    the current file. """
+
+    ft = vim.eval("&filetype")
+    # check if the comment dict has the format for the current file
+    if _commentDict.has_key(ft):
+        return _commentDict[ft]
+
+    # otherwise parse vim's comments and add it for later use
+    commentformat = _parse_comments(vim.eval("&comments"))[0]
+    _commentDict[ft] = commentformat
+
+    return commentformat
+
+
+def make_box(twidth, bwidth = None):
+   if bwidth is None:
+      bwidth = twidth + 2
+   b,m,e,i = _get_comment_format()
+   sline = b + m + bwidth*m + 2*m
+   nspaces = (bwidth - twidth)//2 
+   mlines = i + m + " " + " "*nspaces
+   mlinee = " " + " "*(bwidth-twidth-nspaces) + m
+   eline = i + 2*m + bwidth*m + m + e
+   return sline, mlines, mlinee, eline
+endglobal
+
+snippet box "A nice box with the current comment symbol" b
+`!p
+box = make_box(len(t[1]))
+snip.rv = box[0] + '\n' + box[1]
+`${1:content}`!p
+box = make_box(len(t[1]))
+snip.rv = box[2] + '\n' + box[3]`
+$0
+endsnippet
+
+snippet bbox "A nice box over the full width" b
+`!p
+box = make_box(len(t[1]), 71)
+snip.rv = box[0] + '\n' + box[1]
+`${1:content}`!p
+box = make_box(len(t[1]), 71)
+snip.rv = box[2] + '\n' + box[3]`
+$0
+endsnippet
+
+##########################
+# LOREM IPSUM GENERATORS #
+##########################
+snippet lorem "Lorem Ipsum - 50 Words" b
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
+vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
+no sea takimata sanctus est Lorem ipsum dolor sit amet.
+endsnippet
+
+#######################################
+#  Date Snipper for UN Email Subject  #
+#######################################
+
+snippet ddate "Date Snippet for UN Email" !b
+Dev updates on `!v strftime('%b %d, %Y')`
+endsnippet
+
+# vim:ft=snippets:

vim/UltiSnips/bindzone.snippets

+global !p
+def newsoa():
+    import datetime
+    now = datetime.datetime.now()
+    # return standard SOA formatted serial for today
+    return now.strftime("%Y%m%d00")
+endglobal
+
+snippet zone "Bootstrap a new Bind zonefile" b
+$TTL 86400
+@     IN SOA   ${1:example.net}.     ${2:hostmaster.$1}.(
+                        `!p snip.rv = newsoa()`;     serial
+                        21600;          refresh every 6 hours
+                        3600;           retry after one hour
+                        604800;         expire after a week
+                        86400 );        minimum TTL of 1 day
+
+                IN      NS              ns01.$1.
+                IN      MX      10      mail.$1.
+
+ns01.$1         IN      A       
+mail.$1         IN      A   
+endsnippet
+
+snippet A "Insert A Record" b
+${1:hostname}   IN      A   ${2:ip}
+endsnippet

vim/UltiSnips/c.snippets

+###########################################################################
+#                            TextMate Snippets                            #
+###########################################################################
+
+snippet def "#define ..."
+#define ${1}
+endsnippet
+
+snippet ifndef "#ifndef ... #define ... #endif"
+#ifndef ${1/([A-Za-z0-9_]+).*/$1/}
+#define ${1:SYMBOL} ${2:value}
+#endif
+endsnippet
+
+snippet #if "#if #endif" !b
+#if ${1:0}
+${VISUAL:code}$0
+#endif
+endsnippet
+
+snippet inc "#include local header (inc)"
+#include "${1:`!p snip.rv = snip.basename + '.h'`}"
+endsnippet
+
+snippet Inc "#include <> (Inc)"
+#include <${1:.h}>
+endsnippet
+
+snippet mark "#pragma mark (mark)"
+#if 0
+${1:#pragma mark -
+}#pragma mark $2
+#endif
+
+$0
+endsnippet
+
+snippet main "main() (main)"
+int main(int argc, char const *argv[])
+{
+	${0:/* code */}
+	return 0;
+}
+endsnippet
+
+snippet for "for int loop (fori)"
+for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
+{
+	${0:/* code */}
+}
+endsnippet
+
+snippet enum "Enumeration"
+enum ${1:name} { $0 };
+endsnippet
+
+snippet once "Include header once only guard"
+#ifndef ${1:`!p
+if not snip.c:
+	import random, string
+	name = re.sub(r'[^A-Za-z0-9]+','_', snip.fn).upper()
+	rand = ''.join(random.sample(string.ascii_letters+string.digits, 8))
+	snip.rv = ('%s_%s' % (name,rand)).upper()
+else:
+    snip.rv = snip.c`}
+#define $1
+
+${0}
+
+#endif /* end of include guard: $1 */
+
+endsnippet
+
+snippet td "Typedef"
+typedef ${1:int} ${2:MyCustomType};
+endsnippet
+
+snippet do "do...while loop (do)"
+do {
+	${0:/* code */}
+} while(${1:/* condition */});
+endsnippet
+
+snippet fprintf "fprintf ..."
+fprintf(${1:stderr}, "${2:%s}\n"${2/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$3${2/([^%]|%%)*(%.)?.*/(?2:\);)/}
+endsnippet
+
+snippet if "if .. (if)"
+if (${1:/* condition */})
+{
+	${0:/* code */}
+}
+endsnippet
+
+snippet ife "if .. else (ife)"
+if (${1:/* condition */})
+{
+        ${2:/* code */}
+}
+else
+{
+        ${3:/* else */}
+}
+endsnippet
+
+snippet printf "printf .. (printf)"
+printf("${1:%s}\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/}
+endsnippet
+
+snippet st "struct"
+struct ${1:`!p snip.rv = (snip.basename or "name") + "_t"`}
+{
+	${0:/* data */}
+};
+endsnippet
+
+# vim:ft=snippets:

vim/UltiSnips/coffee.snippets

+# From the TextMate bundle
+# with some modification
+
+snippet fun "Function" b
+${1:name} = `!p snip.rv = "(" if t[2] else ""`${2:args}`!p snip.rv = ") " if t[2] else ""`->
+	${0:# body...}
+endsnippet
+
+snippet bfun "Function (bound)" i
+`!p snip.rv = "(" if t[1] else ""`${1:args}`!p snip.rv = ") " if t[1] else ""`=>`!p snip.rv = " " if t[2] and not t[2].startswith("\n") else ""`${2:expr}
+endsnippet
+
+snippet if "If"
+if ${1:condition}
+	${0:# body...}
+endsnippet
+
+snippet ife "If .. Else"
+if ${1:condition}
+	${2:# body...}
+else
+	${3:# body...}
+endsnippet
+
+snippet eif "Else if" b
+else if ${1:condition}
+	${0:# body...}
+endsnippet
+
+snippet ifte "Ternary if"
+if ${1:condition} then ${2:value} else ${3:other}
+endsnippet
+
+snippet unl "Unless"
+${1:action} unless ${2:condition}
+endsnippet
+
+snippet fora "Array Comprehension"
+for ${1:name} in ${2:array}
+	${0:# body...}
+endsnippet
+
+snippet foro "Object Comprehension"
+for ${1:key}, ${2:value} of ${3:Object}
+	${0:# body...}
+endsnippet
+
+snippet forr "Range Comprehension (inclusive)"
+for ${1:name} in [${2:start}..${3:finish}]`!p snip.rv = " by " if t[4] else ""`${4:step}
+	${0:# body...}
+endsnippet
+
+snippet forrex "Range Comprehension (exclusive)"
+for ${1:name} in [${2:start}...${3:finish}]`!p snip.rv = " by " if t[4] else ""`${4:step}
+	${0:# body...}
+endsnippet
+
+snippet swi "Switch"
+switch ${1:object}
+	when ${2:value}
+		${3:# body...}
+	else
+		$0
+endsnippet
+
+snippet swit "Switch when .. then"
+switch ${1:object}
+	when ${2:condition}`!p snip.rv = " then " if t[3] else ""`${3:value}
+	else`!p snip.rv = " " if t[4] and not t[4].startswith("\n") else ""`${4:value}
+endsnippet
+
+snippet cla "Class" b
+class ${1:ClassName}`!p snip.rv = " extends " if t[2] else ""`${2:Ancestor}
+
+	${3:constructor:`!p snip.rv = " (" if t[4] else ""`${4:args}`!p snip.rv = ")" if t[4] else ""` ->
+		${5:# body...}}
+	$0
+endsnippet
+
+snippet try "Try .. Catch"
+try
+	$1
+catch ${2:error}
+	$3
+endsnippet
+
+snippet req "Require" b
+${1/^'?(\w+)'?$/\L$1\E/} = require(${1:'${2:sys}'})
+endsnippet
+
+snippet # "Interpolated Code" i
+#{$1}$0
+endsnippet
+
+snippet log "Log" b
+console.log ${1:"${2:msg}"}
+endsnippet
+

vim/UltiSnips/coffee_jasmine.snippets

+#
+# CoffeeScript versions -- adapted from the JS TextMate bundle + additions
+# for some jasmine-jquery matchers
+#
+extends coffee
+
+snippet des "Describe (coffee)" b
+describe '${1:description}', ->
+	$0
+endsnippet
+
+snippet it "it (coffee)" b
+it '${1:description}', ->
+	$0
+endsnippet
+
+snippet bef "before each (coffee)" b
+beforeEach ->
+	$0
+endsnippet
+
+snippet aft "after each (coffee)" b
+afterEach ->
+	$0
+endsnippet
+
+snippet any "any (coffee)" b
+jasmine.any($1)
+endsnippet
+
+snippet ru "runs (coffee)" b
+runs ->
+	$0
+endsnippet
+
+snippet wa "waits (coffee)" b
+waits($1)
+endsnippet
+
+snippet ex "expect (coffee)" b
+expect(${1:target})$0
+endsnippet
+
+snippet ee "expect to equal (coffee)" b
+expect(${1:target}).toEqual(${2:value})
+endsnippet
+
+snippet em "expect to match (coffee)" b
+expect(${1:target}).toMatch(${2:pattern})
+endsnippet
+
+snippet eha "expect to have attribute (coffee)" b
+expect(${1:target}).toHaveAttr('${2:attr}'${3:, '${4:value}'})
+endsnippet
+
+snippet et "expect to be truthy (coffee)" b
+expect(${1:target}).toBeTruthy()
+endsnippet
+
+snippet ef "expect to be falsy (coffee)" b
+expect(${1:target}).toBeFalsy()
+endsnippet
+
+snippet ed "expect to be defined (coffee)" b
+expect(${1:target}).toBeDefined()
+endsnippet
+
+snippet en "expect to be null (coffee)" b
+expect(${1:target}).toBeNull()
+endsnippet
+
+snippet ec "expect to contain (coffee)" b
+expect(${1:target}).toContain(${2:value})
+endsnippet
+
+snippet ev "expect to be visible (coffee)" b
+expect(${1:target}).toBeVisible()
+endsnippet
+
+snippet eh "expect to be hidden (coffee)" b
+expect(${1:target}).toBeHidden()
+endsnippet
+
+snippet notx "expect not (coffee)" b
+expect(${1:target}).not$0
+endsnippet
+
+snippet note "expect not to equal (coffee)" b
+expect(${1:target}).not.toEqual(${2:value})
+endsnippet
+
+snippet notm "expect not to match (coffee)" b
+expect(${1:target}).not.toMatch(${2:pattern})
+endsnippet
+
+snippet notha "expect to not have attribute (coffee)" b
+expect(${1:target}).not.toHaveAttr('${2:attr}'${3:, '${4:value}'})
+endsnippet
+
+snippet nott "expect not to be truthy (coffee)" b
+expect(${1:target}).not.toBeTruthy()
+endsnippet
+
+snippet notf "expect not to be falsy (coffee)" b
+expect(${1:target}).not.toBeFalsy()
+endsnippet
+
+snippet notd "expect not to be defined (coffee)" b
+expect(${1:target}).not.toBeDefined()
+endsnippet
+
+snippet notn "expect not to be null (coffee)" b
+expect(${1:target}).not.toBeNull()
+endsnippet
+
+snippet notc "expect not to contain (coffee)" b
+expect(${1:target}).not.toContain(${2:value})
+endsnippet
+
+snippet notv "expect not to be visible (coffee)" b
+expect(${1:target}).not.toBeVisible()
+endsnippet
+
+snippet noth "expect not to be hidden (coffee)" b
+expect(${1:target}).not.toBeHidden()
+endsnippet
+
+snippet s "spy on (coffee)" b
+spyOn(${1:object}, "${2:method}")$0
+endsnippet
+
+snippet sr "spy on and return (coffee)" b
+spyOn(${1:object}, "${2:method}").andReturn(${3:arguments})
+endsnippet
+
+snippet st "spy on and throw (coffee)" b
+spyOn(${1:object}, "${2:method}").andThrow(${3:exception})
+endsnippet
+
+snippet sct "spy on and call through (coffee)" b
+spyOn(${1:object}, "${2:method}").andCallThrough()
+endsnippet
+
+snippet scf "spy on and call fake (coffee)" b
+spyOn(${1:object}, "${2:method}").andCallFake(${3:function})
+endsnippet
+
+snippet esc "expect was called (coffee)" b
+expect(${1:target}).wasCalled()
+endsnippet
+
+snippet escw "expect was called with (coffee)" b
+expect(${1:target}).wasCalledWith(${2:arguments})
+endsnippet
+
+snippet notsc "expect was not called (coffee)" b
+expect(${1:target}).wasNotCalled()
+endsnippet
+
+snippet noscw "expect was not called with (coffee)" b
+expect(${1:target}).wasNotCalledWith(${2:arguments})
+endsnippet
+

vim/UltiSnips/cpp.snippets

+###########################################################################
+#                            TextMate Snippets                            #
+###########################################################################
+snippet beginend "$1.begin(), $1.end() (beginend)"
+${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}begin(), $1${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end()
+endsnippet
+
+snippet cl "class .. (class)"
+class ${1:`!p snip.rv = snip.basename or "name"`}
+{
+public:
+	${1/(\w+).*/$1/} (${2:arguments});
+	virtual ~${1/(\w+).*/$1/} ();
+
+private:
+	${0:/* data */}
+};
+endsnippet
+
+snippet ns "namespace .. (namespace)"
+namespace${1/.+/ /m}${1:`!p snip.rv = snip.basename or "name"`}
+{
+	$0
+}${1/.+/ \/* /m}$1${1/.+/ *\/ /m}
+endsnippet
+
+snippet readfile "read file (readF)"
+std::vector<char> v;
+if (FILE *fp = fopen(${1:"filename"}, "r"))
+{
+	char buf[1024];
+	while(size_t len = fread(buf, 1, sizeof(buf), fp))
+		v.insert(v.end(), buf, buf + len);
+	fclose(fp);
+}
+endsnippet
+
+snippet map "std::map (map)"
+std::map<${1:key}, ${2:value}> map$0;
+endsnippet
+
+snippet vector "std::vector (v)"
+std::vector<${1:char}> v$0;
+endsnippet
+
+snippet tp "template <typename ..> (template)"
+template <typename ${1:_InputIter}>
+endsnippet
+
+# vim:ft=snippets:

vim/UltiSnips/css.snippets

+###########################################################################
+#                    Most of these came from TextMate                     #
+###########################################################################
+
+snippet ! "!important CSS (!)"
+${1:!important}
+endsnippet
+
+snippet fixed "Fixed Position Bottom 100% wide IE6"
+${2:bottom: auto;}top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-${1:THE HEIGHT OF THIS THING IN PIXELS}));
+${3:left: expression(eval(document.documentElement.scrollLeft));
+}${4:width: expression(eval(document.documentElement.clientWidth));}$0
+endsnippet
+
+snippet background "background-attachment: scroll:fixed (background)"
+background-attachment: ${1:scroll/fixed};$0
+endsnippet
+
+snippet background "background-color:  color-hex (background)"
+background-color: #${1:DDD};$0
+endsnippet
+
+snippet background "background-color:  color-name (background)"
+background-color: ${1:red};$0
+endsnippet
+
+snippet background "background-color:  color-rgb (background)"
+background-color: rgb(${1:255},${2:255},${3:255});$0
+endsnippet
+
+snippet background "background-color:  transparent (background)"
+background-color: transparent;$0
+endsnippet
+
+snippet background "background-image:  none (background)"
+background-image: none;$0
+endsnippet
+
+snippet background "background-image:  url (background)"
+background-image: url($1);$0
+endsnippet
+
+snippet background "background-position:  position (background)"
+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
+endsnippet
+
+snippet background "background-repeat:  r:r-x:r-y:n-r (background)"
+background-repeat: ${1:repeat/repeat-x/repeat-y/no-repeat};$0
+endsnippet
+
+snippet background "background:  color image repeat attachment position (background)"
+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
+endsnippet
+
+snippet border "border-bottom-color: size style color (border)"
+border-bottom-color: #${1:999};$0
+endsnippet
+
+snippet border "border-bottom-style: size style color (border)"
+border-bottom-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
+endsnippet
+
+snippet border "border-bottom-width: size style color (border)"
+border-bottom-width: ${1:1}px ${2:solid} #${3:999};$0
+endsnippet
+
+snippet border "border-bottom: size style color (border)"
+border-bottom: ${1:1}px ${2:solid} #${3:999};$0
+endsnippet
+
+snippet border "border-color: color (border)"
+border-color: ${1:999};$0
+endsnippet
+
+snippet border "border-left-color: color (border)"
+border-right-color: #${1:999};$0
+endsnippet
+
+snippet border "border-left-style: style (border)"
+border-left-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
+endsnippet
+
+snippet border "border-left-width: size (border)"
+border-left-width: ${1:1}px
+endsnippet
+
+snippet border "border-left: size style color (border)"
+border-left: ${1:1}px ${2:solid} #${3:999};$0
+endsnippet
+
+snippet border "border-right-color: color (border)"
+border-right-color: #${1:999};$0
+endsnippet
+
+snippet border "border-right-style: style (border)"
+border-right-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
+endsnippet
+
+snippet border "border-right-width: size (border)"
+border-right-width: ${1:1}px
+endsnippet
+
+snippet border "border-right: size style color (border)"
+border-right: ${1:1}px ${2:solid} #${3:999};$0
+endsnippet
+
+snippet border "border-style: style (border)"
+border-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
+endsnippet
+
+snippet border "border-top-color: color (border)"
+border-top-color: #${1:999};$0
+endsnippet
+
+snippet border "border-top-style: style (border)"
+border-top-style: ${1:none/hidden/dotted/dashed/solid/double/groove/ridge/inset/outset};$0
+endsnippet
+
+snippet border "border-top-width: size (border)"
+border-top-width: ${1:1}px
+endsnippet
+
+snippet border "border-top: size style color (border)"
+border-top: ${1:1}px ${2:solid} #${3:999};$0
+endsnippet
+
+snippet border "border-width: width (border)"
+border-width: ${1:1px};$0
+endsnippet
+
+snippet border "border:   size style color (border)"
+border: ${1:1px} ${2:solid} #${3:999};$0
+endsnippet
+
+snippet clear "clear: value (clear)"
+clear: ${1:left/right/both/none};$0
+endsnippet
+
+snippet color "color:  color-hex (color)"
+color: #${1:DDD};$0
+endsnippet
+
+snippet color "color:  color-name (color)"
+color: ${1:red};$0
+endsnippet
+
+snippet color "color:  color-rgb (color)"
+color: rgb(${1:255},${2:255},${3:255});$0
+endsnippet
+
+snippet cursor "cursor: type (cursor)"
+cursor: ${1:default/auto/crosshair/pointer/move/*-resize/text/wait/help};$0
+endsnippet
+
+snippet cursor "cursor: url (cursor)"
+cursor: url($1);$0
+endsnippet
+
+snippet direction "direction: ltr|rtl (direction)"
+direction: ${1:ltr|rtl};$0
+endsnippet
+
+snippet display "display: block (display)"
+display: block;$0
+endsnippet
+
+snippet display "display: common-types (display)"
+display: ${1:none/inline/block/list-item/run-in/compact/marker};$0
+endsnippet
+
+snippet display "display: inline (display)"
+display: inline;$0
+endsnippet
+
+snippet display "display: table-types (display)"
+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
+endsnippet
+
+snippet float "float: left:right:none (float)"
+float: ${1:left/right/none};$0
+endsnippet
+
+snippet font "font-family:   family (font)"
+font-family: ${1:Arial, "MS Trebuchet"}, ${2:sans-}serif;$0
+endsnippet
+
+snippet font "font-size: size (font)"
+font-size: ${1:100%};$0
+endsnippet
+
+snippet font "font-style:   normal:italic:oblique (font)"
+font-style: ${1:normal/italic/oblique};$0
+endsnippet
+
+snippet font "font-variant:   normal:small-caps (font)"
+font-variant: ${1:normal/small-caps};$0
+endsnippet
+
+snippet font "font-weight: weight (font)"
+font-weight: ${1:normal/bold};$0
+endsnippet
+
+snippet font "font:   style variant weight size:line-height font -family (font)"
+font: ${1:normal/italic/oblique} ${2:normal/small-caps} ${3:normal/bold} ${4:1em/1.5em} ${5:Arial}, ${6:sans-}serif;$0
+endsnippet
+
+snippet font "font: size font (font)"
+font: ${1:75%} ${2:"Lucida Grande", "Trebuchet MS", Verdana,} ${3:sans-}serif;$0
+endsnippet
+
+snippet letter "letter-spacing:   length-em (letter)"
+letter-spacing: $1em;$0
+endsnippet
+
+snippet letter "letter-spacing:   length-px (letter)"
+letter-spacing: $1px;$0
+endsnippet
+
+snippet list "list-style-image: url (list)"
+list-style-image: url($1);$0
+endsnippet
+
+snippet list "list-style-position: pos (list)"
+list-style-position: ${1:inside/outside};$0
+endsnippet
+
+snippet list "list-style-type: asian (list)"
+list-style-type: ${1:cjk-ideographic/hiragana/katakana/hiragana-iroha/katakana-iroha};$0
+endsnippet
+
+snippet list "list-style-type: marker(list)"
+list-style-type: ${1:none/disc/circle/square};$0
+endsnippet
+
+snippet list "list-style-type: numeric (list)"
+list-style-type: ${1:decimal/decimal-leading-zero/zero};$0
+endsnippet
+
+snippet list "list-style-type: other (list)"
+list-style-type: ${1:hebrew/armenian/georgian};$0
+endsnippet
+
+snippet list "list-style-type: roman-alpha-greek (list)"
+list-style-type: ${1:lower-roman/upper-roman/lower-alpha/upper-alpha/lower-greek/lower-latin/upper-latin};$0
+endsnippet
+
+snippet list "list-style: type position image (list)"
+list-style: ${1:none/disc/circle/square/decimal/zero} ${2:inside/outside} url($3);$0
+endsnippet
+
+snippet margin "margin-bottom: length (margin)"
+margin-bottom: ${1:20px};$0
+endsnippet
+
+snippet margin "margin-left: length (margin)"
+margin-left: ${1:20px};$0
+endsnippet
+
+snippet margin "margin-right: length (margin)"
+margin-right: ${1:20px};$0
+endsnippet
+
+snippet margin "margin-top: length (margin)"
+margin-top: ${1:20px};$0
+endsnippet
+
+snippet margin "margin:   all (margin)"
+margin: ${1:20px};$0
+endsnippet
+
+snippet margin "margin: T R B L (margin)"
+margin: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
+endsnippet
+
+snippet margin "margin: V H (margin)"
+margin: ${1:20px} ${2:0px};$0
+endsnippet
+
+snippet marker "marker-offset: auto (marker)"
+marker-offset: auto;$0
+endsnippet
+
+snippet marker "marker-offset: length (marker)"
+marker-offset: ${1:10px};$0
+endsnippet
+
+snippet overflow "overflow: type (overflow)"
+overflow: ${1:visible/hidden/scroll/auto};$0
+endsnippet
+
+snippet padding "padding-bottom: length (margin)"
+padding-bottom: ${1:20px};$0
+endsnippet
+
+snippet padding "padding-left: length (margin)"
+padding-left: ${1:20px};$0
+endsnippet
+
+snippet padding "padding-right: length (margin)"
+padding-right: ${1:20px};$0
+endsnippet
+
+snippet padding "padding-top: length (margin)"
+padding-top: ${1:20px};$0
+endsnippet
+
+snippet padding "padding:   T R B L (padding)"
+padding: ${1:20px} ${2:0px} ${3:40px} ${4:0px};$0
+endsnippet
+
+snippet padding "padding:   V H (padding)"
+padding: ${1:20px} ${2:0px};$0
+endsnippet
+
+snippet padding "padding:   all (padding)"
+padding: ${1:20px};$0
+endsnippet
+
+snippet position "position: type (position)"
+position: ${1:static/relative/absolute/fixed};$0
+endsnippet
+
+snippet { "properties { } ( } )"
+{
+	/* $1 */
+	$0
+
+endsnippet
+
+snippet scrollbar "scrollbar"
+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};}
+endsnippet
+
+snippet selection "selection"
+$1::-moz-selection,
+$1::selection {
+	color: ${2:inherit};
+	background: ${3:inherit};
+}
+endsnippet
+
+snippet text "text-align: left:center:right (txt)"
+text-align: ${1:left/right/center/justify};$0
+endsnippet
+
+snippet text "text-decoration: none:underline:overline:line-through:blink (text)"
+text-decoration: ${1:none/underline/overline/line-through/blink};$0
+endsnippet
+
+snippet text "text-indent: length (text)"
+text-indent: ${1:10}px;$0
+endsnippet
+
+snippet text "text-shadow: color-hex x y blur (text)"
+text-shadow: #${1:DDD} ${2:10px} ${3:10px} ${4:2px};$0
+endsnippet
+
+snippet text "text-shadow: color-rgb x y blur (text)"
+text-shadow: rgb(${1:255},${2:255},${3:255}) ${4:10px} ${5:10px} ${6:2px};$0
+endsnippet
+
+snippet text "text-shadow: none (text)"
+text-shadow: none;$0
+endsnippet
+
+snippet text "text-transform: capitalize:upper:lower (text)"
+text-transform: ${1:capitalize/uppercase/lowercase};$0
+endsnippet
+
+snippet text "text-transform: none (text)"
+text-transform: none;$0
+endsnippet
+
+snippet vertical "vertical-align: type (vertical)"
+vertical-align: ${1:baseline/sub/super/top/text-top/middle/bottom/text-bottom/length/%};$0
+endsnippet
+
+snippet visibility "visibility: type (visibility)"
+visibility: ${1:visible/hidden/collapse};$0
+endsnippet
+
+snippet white "white-space:  normal:pre:nowrap (white)"
+white-space: ${1:normal/pre/nowrap};$0
+endsnippet
+
+snippet word "word-spacing:  length (word)"
+word-spacing: ${1:10px};$0
+endsnippet
+
+snippet word "word-spacing:  normal (word)"
+word-spacing: normal;$0
+endsnippet
+
+snippet z "z-index: index (z)"
+z-index: $1;$0
+endsnippet
+
+# vim:ft=snippets:

vim/UltiSnips/d.snippets

+# Simple shortcuts
+
+snippet imp "import (imp)" b
+import ${1:std.stdio};
+endsnippet
+
+snippet pimp "public import (pimp)" b
+public import ${1:/*module*/};
+endsnippet
+
+snippet over "override (over)" b
+override ${1:/*function*/}
+endsnippet
+
+snippet al "alias (al)"
+alias ${1:/*orig*/} ${2:/*alias*/};
+endsnippet
+
+snippet mixin "mixin (mixin)" b
+mixin ${1:/*mixed_in*/} ${2:/*name*/};
+endsnippet
+
+snippet new "new (new)"
+new ${1}(${2});
+endsnippet
+
+snippet scpn "@safe const pure nothrow (scpn)"
+@safe const pure nothrow
+endsnippet
+
+snippet spn "@safe pure nothrow (spn)"
+@safe pure nothrow
+endsnippet
+
+snippet cont "continue (cont)"
+continue;
+endsnippet
+
+snippet dis "@disable (dis)" b
+@disable ${1:/*method*/};
+endsnippet
+
+snippet pub "public (pub)" b
+public:
+    ${1:/*members*/}
+endsnippet
+
+snippet priv "private (priv)" b
+private:
+    ${1:/*members*/}
+endsnippet
+
+snippet prot "protected (prot)" b
+protected:
+    ${1:/*members*/}
+endsnippet
+
+snippet pack "package (pack)" b
+package:
+    ${1:/*members*/}
+endsnippet
+
+snippet ret "return (ret)"
+return ${1:/*value to return*/};
+endsnippet
+
+snippet auto "auto (auto)" b
+auto ${1:/*variable*/} = ${2:/*value*/};
+endsnippet
+
+snippet con "const (con)" b
+const ${1:/*variable*/} = ${2:/*value*/};
+endsnippet
+
+snippet siz "size_t (siz)" b
+size_t ${1:/*variable*/} = ${2:/*value*/};
+endsnippet
+
+snippet sup "super (sup)" b
+super(${1:/*args*/});
+endsnippet
+
+# Phobos
+
+snippet tup "tuple (tup)"
+tuple(${1:/*args*/})
+endsnippet
+
+snippet wr "writeln (wr)"
+writeln(${1:/*args*/});
+endsnippet
+
+snippet to "to (to)"
+to!(${1:/*type*/})(${2:/*arg*/})
+endsnippet
+
+snippet enf "enforce (enf)" b
+enforce(${1:/*condition*/},
+        new ${2}Exception(${3:/*args*/}));
+endsnippet
+
+# Branches
+
+snippet if "if .. (if)"
+if(${1:/*condition*/})
+{
+    ${VISUAL}${0:/*code*/}
+}
+endsnippet
+
+snippet ife "if .. else (ife)" b
+if(${1:/*condition*/})
+{
+    ${2:/*code*/}
+}
+else
+{
+    ${3:/*else*/}
+}
+endsnippet
+
+snippet el "else (el)" b
+else
+{
+    ${VISUAL}${1:/*code*/}
+}
+endsnippet
+
+snippet eif "else if (elif)" b
+else if(${1:/*condition*/})
+{
+    ${VISUAL}${0:/*code*/}
+}
+endsnippet
+
+snippet sw "switch (sw)"
+switch(${1:/*var*/})
+{
+    case ${2:/*value*/}:
+        ${3:/*code*/}
+        break;
+    case ${4:/*value*/}:
+        ${5:/*code*/}
+        break;
+    ${7:/*more cases*/}
+    default:
+        ${6:assert(false);}
+}
+endsnippet
+
+snippet fsw "final switch (fsw)"
+switch(${1:/*var*/})
+{
+    case ${2:/*value*/}:
+        ${3:/*code*/}
+        break;
+    case ${4:/*value*/}:
+        ${5:/*code*/}
+        break;
+    ${7:/*more cases*/}
+}
+endsnippet
+
+snippet case "case (case)" b
+case ${1:/*value*/}:
+    ${2:/*code*/}
+    break;
+endsnippet
+
+snippet ?: "ternary operator (?:)"
+${1:/*condition*/} ? ${2:/*then*/} : ${3:/*else*/}$4
+endsnippet
+
+# Loops
+
+snippet do "do while (do)" b
+do
+{
+    ${VISUAL}${2:/*code*/}
+} while(${1:/*condition*/});
+endsnippet
+
+snippet wh "while (wh)" b
+while(${1:/*condition*/})
+{
+    ${VISUAL}${2:/*code*/}
+}
+endsnippet
+
+snippet for "for (for)" b
+for (${4:size_t} ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
+{
+    ${VISUAL}${0:/*code*/}
+}
+endsnippet
+
+snippet forever "forever (forever)" b
+for(;;)
+{
+    ${VISUAL}${0:/*code*/}
+}
+endsnippet
+
+snippet fore "foreach (fore)"
+foreach(${1:/*elem*/}; ${2:/*range*/})
+{
+    ${VISUAL}${3:/*code*/}
+}
+endsnippet
+
+snippet forif "foreach if (forif)" b
+foreach(${1:/*elem*/}; ${2:/*range*/}) if(${3:/*condition*/})
+{
+    ${VISUAL}${4:/*code*/}
+}
+endsnippet
+
+# Contracts
+snippet in "in contract (in)" b
+in
+{
+    assert(${1:/*condition*/}, "${2:error message}");
+    ${3}
+}
+body
+endsnippet
+
+snippet out "out contract (out)" b
+out${1:(result)}
+{
+    assert(${2:/*condition*/}, "${3:error message}");
+    ${4}
+}
+body
+endsnippet
+
+snippet inv "invariant (inv)" b
+invariant()
+{
+    assert(${1:/*condition*/}, "${2:error message}");
+    ${3}
+}
+endsnippet
+
+# Functions (generic)
+
+snippet fun "function definition (fun)"
+${1:void} ${2:/*function name*/}(${3:/*args*/}) ${4:@safe pure nothrow}
+{
+    ${VISUAL}${5:/*code*/}
+}
+endsnippet
+
+snippet void "void function definition (void)"
+void ${1:/*function name*/}(${2:/*args*/}) ${3:@safe pure nothrow}
+{
+    ${VISUAL}${4:/*code*/}
+}
+endsnippet
+
+snippet this "ctor (this)" w
+this(${1:/*args*/})
+{
+    ${VISUAL}${2:/*code*/}
+}
+endsnippet
+
+snippet get "getter property (get)" !
+@property ${1:/*type*/} ${2:/*member_name*/}() const pure nothrow {return ${3:$2_};}
+endsnippet
+
+snippet set "setter property (set)" !
+@property void ${1:/*member_name*/}(${2:/*type*/} rhs) pure nothrow {${3:$1_} = rhs;}
+endsnippet
+
+# Functions (concrete)
+
+snippet main "Main" b
+void main(string[] args)
+{
+    ${VISUAL}${0: /*code*/}
+}
+endsnippet
+
+# Mixins
+
+snippet signal "signal (signal)" b
+mixin Signal!(${1:/*args*/}) ${2:/*name*/};
+endsnippet
+
+# Scope
+
+snippet scope "scope (scope)" b
+scope(${1:exit})
+{
+    ${VISUAL}${2:/*code*/}
+}
+endsnippet
+
+# With
+
+snippet with "with (with)"
+with(${1})
+{
+    ${VISUAL}${2:/*code*/}
+}
+endsnippet
+
+# Exception handling
+
+snippet try "try/catch (try)" b
+try
+{
+    ${VISUAL}${1:/*code to try*/}
+}
+catch(${2}Exception e)
+{
+    ${3:/*handle exception*/}
+}
+endsnippet
+
+snippet tryf "try/catch/finally (tryf)" b
+try
+{
+    ${VISUAL}${1:/*code to try*/}
+}
+catch(${2}Exception e)
+{
+    ${3:/*handle exception*/}
+}
+finally
+{
+    ${4:/*cleanup*/}
+}
+endsnippet
+
+snippet catch "catch (catch)" b
+catch(${1}Exception e)
+{
+    ${2:/*handle exception*/}
+}
+endsnippet
+
+snippet thr "throw (thr)"
+throw new ${1}Exception("${2}");
+endsnippet
+
+
+# Type declarations
+
+snippet struct "struct (struct)"
+struct ${1:`!p snip.rv = (snip.basename or "name")`}
+{
+    ${2}
+}
+endsnippet
+
+snippet union "union (union)"
+union ${1:`!p snip.rv = (snip.basename or "name")`}
+{
+    ${2}
+}
+endsnippet
+
+snippet class "class (class)"
+class ${1:`!p snip.rv = (snip.basename or "name")`}
+{
+    ${2}
+}
+endsnippet
+
+snippet inter "interface (inter)"
+interface ${1:`!p snip.rv = (snip.basename or "name")`}
+{
+    ${2}
+}
+endsnippet
+
+snippet enum "enum (enum)"
+enum ${1:`!p snip.rv = (snip.basename or "name")`}
+{
+    ${2}
+}
+endsnippet
+
+
+# Exception declarations
+
+snippet exc "exception declaration (exc)" b
+/// ${3:/*documentation*/}
+class ${1}Exception : ${2}Exception 
+{
+    public this(string msg, string file = __FILE__, int line = __LINE__)
+    {
+        super(msg, file, line);
+    }
+}
+endsnippet
+
+
+# Conditional compilation
+
+snippet version "version (version)" b
+version(${1:/*version name*/})
+{
+    ${VISUAL}${2:/*code*/}
+}
+endsnippet
+
+snippet debug "debug" b
+debug
+{
+    ${VISUAL}${1:/*code*/}
+}
+endsnippet
+
+
+# Templates
+
+snippet temp "template (temp)" b
+template ${2:/*name*/}(${1:/*args*/})
+{
+    ${3:/*code*/}
+}
+endsnippet
+
+
+# Asserts
+
+snippet ass "assert (ass)" b
+assert(${1:false}, "${2:TODO}");
+
+endsnippet
+
+
+# Unittests
+
+snippet unittest "unittest (unittest)" b
+unittest
+{
+    ${1:/*code*/}
+}
+endsnippet
+
+
+# Common member functions
+
+snippet opDis "opDispatch (opDis)" b
+${1:/*return type*/} opDispatch(string s)()
+{
+    ${2:/*code*/};
+}
+endsnippet
+
+snippet op= "opAssign (op=)" b
+void opAssign(${1} rhs) ${2:@safe pure nothrow}
+{
+    ${2:/*code*/}
+}
+endsnippet
+
+snippet opCmp "opCmp (opCmp)" b
+int opCmp(${1} rhs) @safe const pure nothrow
+{
+    ${2:/*code*/}
+}
+endsnippet
+
+snippet opApply "opApply (opApply)" b
+int opApply(int delegate(ref ${1:/*iterated type/s*/}) dg)
+{
+    int result = 0;
+    ${2:/*loop*/}
+    {
+        result = dg(${3:/*arg/s*/});
+        if(result){break;}
+    }
+    return result;
+}
+endsnippet
+
+snippet toString "toString (toString)" b
+string toString() @safe const pure nothrow
+{
+    ${1:/*code*/}
+}
+endsnippet
+
+
+# Comments
+
+
+snippet todo "TODO (todo)" !
+// TODO: ${1}
+endsnippet
+
+
+
+# DDoc
+
+snippet doc "generic ddoc block (doc)" b
+/// ${1:description}
+///
+/// ${2:details}
+endsnippet
+
+snippet fdoc "function ddoc block (fdoc)" b
+/// ${1:description}
+///
+/// ${2:Params:  ${3:param} = ${4:param description}
+///          ${5}}
+///
+/// ${6:Returns: ${7:return value}}
+///
+/// ${8:Throws:  ${9}Exception ${10}}
+endsnippet
+
+snippet Par "Params (Par)"
+Params:  ${1:param} = ${2:param description}
+///         ${3}
+endsnippet
+
+snippet Ret "Returns (Ret)"
+Returns:  ${1:return value/s}
+endsnippet
+
+snippet Thr "Throws (Thr)"
+Throws:  ${1}Exception ${2}
+endsnippet
+
+snippet Example "Examples (Example)"
+Examples:
+/// --------------------
+/// ${1:example code}
+/// --------------------
+endsnippet
+
+
+# License blocks
+
+snippet gpl "GPL (gpl)" b
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// 
+// Copyright (C) ${1:Author}, `!v strftime("%Y")`
+
+${2}
+endsnippet
+
+snippet boost "Boost (boost)" b
+//          Copyright ${1:Author} `!v strftime("%Y")`.
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+${2}
+endsnippet
+
+
+# New module
+
+snippet module "New module (module)" b
+//          Copyright ${1:Author} `!v strftime("%Y")`.
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+module ${2}.`!v vim_snippets#Filename('$1', 'name')`;
+
+
+${3}
+endsnippet

vim/UltiSnips/django.snippets

+# Generic Tags
+snippet %
+{% ${1} %}${2}
+endsnippet
+
+snippet %%
+{% ${1:tag_name} %}
+  ${2}
+{% end$1 %}
+endsnippet
+
+snippet {
+{{ ${1} }}${2}
+endsnippet
+
+# Template Tags
+
+snippet autoescape
+{% autoescape ${1:off} %}
+  ${2}
+{% endautoescape %}
+endsnippet
+
+snippet block
+{% block ${1} %}
+  ${2}
+{% endblock %}
+endsnippet
+
+snippet #
+{# ${1:comment} #}
+endsnippet
+
+snippet comment
+{% comment %}
+  ${1}
+{% endcomment %}
+endsnippet
+
+snippet cycle
+{% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
+endsnippet
+
+snippet debug
+{% debug %}
+endsnippet
+
+snippet extends
+{% extends "${1:base.html}" %}
+endsnippet
+
+snippet filter
+{% filter ${1} %}
+  ${2}
+{% endfilter %}
+endsnippet
+
+snippet firstof
+{% firstof ${1} %}
+endsnippet
+
+snippet for
+{% for ${1} in ${2} %}
+  ${3}
+{% endfor %}
+endsnippet
+
+snippet empty
+{% empty %}
+  ${1}
+endsnippet
+
+snippet if
+{% if ${1} %}
+  ${2}
+{% endif %}
+endsnippet
+
+snippet el
+{% else %}
+  ${1}
+endsnippet
+
+snippet ifchanged
+{% ifchanged %}${1}{% endifchanged %}
+endsnippet
+
+snippet ifequal
+{% ifequal ${1} ${2} %}
+  ${3}
+{% endifequal %}
+endsnippet
+
+snippet ifnotequal
+{% ifnotequal ${1} ${2} %}
+  ${3}
+{% endifnotequal %}
+endsnippet
+
+snippet include
+{% include "${1}" %}
+endsnippet
+
+snippet load
+{% load ${1} %}
+endsnippet
+
+snippet now
+{% now "${1:jS F Y H:i}" %}
+endsnippet
+
+snippet regroup
+{% regroup ${1} by ${2} as ${3} %}
+endsnippet
+
+snippet spaceless
+{% spaceless %}${1}{% endspaceless %}
+endsnippet
+
+snippet ssi
+{% ssi ${1} %}
+endsnippet
+
+snippet trans
+{% trans "${1:string}" %}
+endsnippet
+
+snippet url
+{% url ${1} as ${2} %}
+endsnippet
+
+snippet widthratio
+{% widthratio ${1:this_value} ${2:max_value} ${3:100} %}
+endsnippet
+
+snippet with
+{% with ${1} as ${2} %}
+endsnippet
+
+# Template Filters
+
+# Note: Since SnipMate can't determine which template filter you are
+# expanding without the "|" character, these do not add the "|"
+# character.  These save a few keystrokes still.
+
+# Note: Template tags that take no arguments are not implemented.
+
+snippet add
+add:"${1}"
+endsnippet
+
+snippet center
+center:"${1}"
+endsnippet
+
+snippet cut
+cut:"${1}"
+endsnippet
+
+snippet date
+date:"${1}"
+endsnippet
+
+snippet default
+default:"${1}"
+endsnippet
+
+snippet defaultifnone
+default_if_none:"${1}"
+endsnippet
+
+snippet dictsort
+dictsort:"${1}"
+endsnippet
+
+snippet dictsortrev
+dictsortreversed:"${1}"
+endsnippet
+
+snippet divisibleby
+divisibleby:"${1}"
+endsnippet
+
+snippet floatformat
+floatformat:"${1}"
+endsnippet
+
+snippet getdigit
+get_digit:"${1}"
+endsnippet
+
+snippet join
+join:"${1}"
+endsnippet
+
+snippet lengthis
+length_is:"${1}"
+endsnippet
+
+snippet pluralize
+pluralize:"${1}"
+endsnippet
+
+snippet removetags
+removetags:"${1}"
+endsnippet
+
+snippet slice
+slice:"${1}"
+endsnippet
+
+snippet stringformat
+stringformat:"${1}"
+endsnippet
+
+snippet time
+time:"${1}"
+endsnippet
+
+snippet truncatewords
+truncatewords:${1}
+endsnippet
+
+snippet truncatewordshtml
+truncatewords_html:${1}
+endsnippet
+
+snippet urlizetrunc
+urlizetrunc:${1}
+endsnippet
+
+snippet wordwrap
+wordwrap:${1}
+endsnippet
+
+# vim:ft=snippets:

vim/UltiSnips/elixir.snippets

+# Credit: @iurifg
+
+snippet do
+do
+	${1}
+end
+endsnippet
+
+snippet if "if .. do .. end"
+if ${1:condition} do
+	${2:expression}
+end
+endsnippet
+
+snippet if "if .. do: .."
+if ${1:condition}, do: ${2:expression}
+endsnippet
+
+snippet ife "if .. do .. else .. end"
+if ${1:condition} do
+	${2:expression}
+else
+	${3:expression}
+end
+endsnippet
+
+snippet ife "if .. do: .. else:"
+if ${1:condition}, do: ${2}, else: ${3}
+endsnippet
+
+snippet unless "unless .. do .. end"
+unless ${1} do
+	${2}
+end
+endsnippet
+
+snippet unless "unless .. do: .."
+unless ${1:condition}, do: ${2}
+endsnippet
+
+snippet unlesse "unless .. do .. else .. end"
+unless ${1:condition} do
+	${2}
+else
+	${3}
+end
+endsnippet
+
+snippet unlesse "unless .. do: .. else:"
+unless ${1:condition}, do: ${2}, else: ${3}
+endsnippet
+
+snippet cond
+"cond do"
+${1} ->
+	${2}
+end
+endsnippet
+
+snippet case
+case ${1} do
+${2} ->
+	${3}
+end
+endsnippet
+
+snippet def
+def ${1:name} do
+	${2}
+end
+endsnippet
+
+snippet defin "def function(n), do: n"
+def ${1:name},  do: ${2}
+endsnippet
+
+snippet defg
+def ${1:name} when ${2:guard-condition} do
+	${3}
+end
+endsnippet
+
+snippet defim
+defimpl ${1:protocol_name}, for: ${2:data_type} do
+	${3}
+end
+endsnippet
+
+snippet defma
+defmacro ${1:name} do
+	${2}
+end
+endsnippet
+
+snippet defmo
+defmodule ${1:module_name} do
+	${2}
+end
+endsnippet
+
+snippet defp
+defp ${1:name} do
+	${2}
+end
+endsnippet
+
+snippet defpr
+defprotocol ${1:name}, [${2:function}]
+endsnippet
+
+snippet defr
+defrecord ${1:record_name}, ${2:fields}
+endsnippet
+
+snippet doc
+@doc """
+${1}
+"""
+endsnippet
+
+snippet fn
+fn(${1:args}) -> ${2} end
+endsnippet
+
+snippet fun
+function do
+	${1}
+end
+endsnippet
+
+snippet mdoc
+@moduledoc """
+${1}
+"""
+endsnippet
+
+snippet rec
+receive do
+${1} ->
+	${2}
+end
+endsnippet
+
+snippet req
+require ${1:module_name}
+endsnippet
+
+snippet imp
+import ${1:module_name}
+endsnippet
+
+snippet ali "alias old-module to shorthand"
+alias ${1:module_name}
+endsnippet
+
+snippet test
+test "${1:test_name}" do
+	${2}
+end
+endsnippet
+
+snippet try "try .. rescue .. end"
+try do
+	${1}
+rescue
+	${2} -> ${3}
+end
+endsnippet

vim/UltiSnips/erlang.snippets

+###########################################################################
+#                            TEXTMATE SNIPPETS                            #
+###########################################################################
+
+snippet pat "Case:Receive:Try Clause"
+${1:pattern}${2: when ${3:guard}} ->;
+	${4:body}
+endsnippet
+
+snippet beh "Behaviour Directive"
+-behaviour (${1:behaviour}).
+endsnippet
+
+snippet case "Case Expression"
+case ${1:expression} of
+	${2:pattern}${3: when ${4:guard}} ->
+		${5:body}
+end
+endsnippet
+
+snippet def "Define Directive"
+-define (${1:macro}${2: (${3:param})}, ${4:body}).
+endsnippet
+
+snippet exp "Export Directive"
+-export ([${1:function}/${2:arity}]).
+endsnippet
+
+snippet fun "Fun Expression"
+fun
+	(${1:pattern})${2: when ${3:guard}} ->
+		${4:body}
+end
+endsnippet
+
+snippet fu "Function"
+${1:function} (${2:param})${3: when ${4:guard}} ->
+	${5:body}
+endsnippet
+
+snippet if "If Expression"
+if
+	${1:guard} ->
+		${2:body}
+end
+endsnippet
+
+snippet ifdef "Ifdef Directive"
+-ifdef (${1:macro}).
+endsnippet
+
+snippet ifndef "Ifndef Directive"
+-ifndef (${1:macro}).
+endsnippet
+
+snippet imp "Import Directive"