From 37184ed3d67dca15d5fb7985ddb73b37b416011a Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Tue, 1 Oct 2013 20:10:02 -0700 Subject: [PATCH] Add custom snippets --- vim/UltiSnips/all.snippets | 3 +++ vim/UltiSnips/javascript.snippets | 15 +++++++++++++++ vim/UltiSnips/python.snippets | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 vim/UltiSnips/all.snippets create mode 100644 vim/UltiSnips/javascript.snippets create mode 100644 vim/UltiSnips/python.snippets diff --git a/vim/UltiSnips/all.snippets b/vim/UltiSnips/all.snippets new file mode 100644 index 0000000..0cb0ab1 --- /dev/null +++ b/vim/UltiSnips/all.snippets @@ -0,0 +1,3 @@ +snippet #! "Shebang" !b +#!/usr/bin/env ${1:bash} +endsnippet diff --git a/vim/UltiSnips/javascript.snippets b/vim/UltiSnips/javascript.snippets new file mode 100644 index 0000000..f3e12ef --- /dev/null +++ b/vim/UltiSnips/javascript.snippets @@ -0,0 +1,15 @@ +snippet f "function" +function ${1:function_name} (${2:argument}) { + ${VISUAL}$0 +} +endsnippet + +snippet scf "self calling function" +(function (${1:argument}) { + ${VISUAL}$0 +}(${2:$1})); +endsnippet + +snippet log "console.log" +console.log(${1:"${2:value}"}); +endsnippet diff --git a/vim/UltiSnips/python.snippets b/vim/UltiSnips/python.snippets new file mode 100644 index 0000000..3457f67 --- /dev/null +++ b/vim/UltiSnips/python.snippets @@ -0,0 +1,3 @@ +snippet map "Map snippet" +map(${1:lambda x: x}, ${2:[]}) +endsnippet