summaryrefslogtreecommitdiff
path: root/.config/vim/UltiSnips/javascript.snippets
diff options
context:
space:
mode:
Diffstat (limited to '.config/vim/UltiSnips/javascript.snippets')
-rw-r--r--.config/vim/UltiSnips/javascript.snippets9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/vim/UltiSnips/javascript.snippets b/.config/vim/UltiSnips/javascript.snippets
new file mode 100644
index 0000000..d4d9475
--- /dev/null
+++ b/.config/vim/UltiSnips/javascript.snippets
@@ -0,0 +1,9 @@
+snippet kview "Keystone view template" b
+var keystone = require('keystone');
+
+exports = module.exports = function (req, res) {
+ var view = new keystone.View(req, res);
+ ${1}
+ view.render('`!p snip.rv=snip.basename`');
+}
+endsnippet