From edc4eedf9abb20b982238a0d55876b1d1f168cb3 Mon Sep 17 00:00:00 2001 From: Sam Shepherd Date: Thu, 10 Mar 2016 10:09:21 -0600 Subject: [PATCH] Added Anonymous Function (javascript) for UltiSnips. Supports $VISUAL. --- UltiSnips/javascript.snippets | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 9480e81..4537bae 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -58,6 +58,12 @@ ${1:var }${2:function_name} = function $2(${3}) { }; endsnippet +snippet af "Anonymous Function" i +function($1) { + ${VISUAL}$0 +} +endsnippet + snippet iife "Immediately-Invoked Function Expression (iife)" (function(${1:window}) { ${VISUAL}$0