Permalink
Browse files

UPdates to snippets.

  • Loading branch information...
1 parent 69adf41 commit 7a504e783f7a75589b27efb1beea8654968c948d @jeffbuttars committed Sep 29, 2012
Showing with 29 additions and 2 deletions.
  1. +1 −1 UltiSnips/javascript.snippets
  2. +7 −0 UltiSnips/python.snippets
  3. +20 −0 UltiSnips/zsh.snippets
  4. +1 −1 vimrc/bundles.vim
@@ -78,7 +78,7 @@ endsnippet
snippet fori "for key in"
for (var ${1:key} in ${2:obj}) { if ($2.hasOwnProperty(key)) {
- ${3:obj[key]};$0
+ ${3:$2[key]};$0
}}
endsnippet
@@ -264,6 +264,13 @@ snippet djf "Django model field member" b
${1:field_name} = models.${2:fieldType}(${3})${0}
endsnippet
+snippet djv "Django view" b
+${1:@render_to}
+def ${2:view_name}(req${3:, kwargs})
+ $0
+#$2()
+endsnippet
+
# snippet pa "Print arg 'arg: %s'" i
# ${1:arg}: %s`!p
@@ -1,8 +1,28 @@
+snippet #! "#!/bin/zsh"
+#!/bin/zsh
+endsnippet
snippet if "if [[ ]]; then"
if [[ ${1} ]]
then
${2}
fi${0}
+endsnippet
+
+snippet fun "function() "
+function ${1}()
+{
+ $0
+} #$1
+endsnippet
+snippet fori
+for ${1:needle} in ${2:haystack} ; do
+ ${3:#statements}
+done
endsnippet
+
+snippet tdir "THIS_DIR"
+THIS_DIR=$(readlink -f "$(dirname $0)")
+endsnippet
+
View
@@ -88,6 +88,6 @@ Bundle 'twilight'
Bundle 'Twilight-for-python'
Bundle 'https://github.com/tpope/vim-vividchalk'
Bundle 'https://github.com/w0ng/vim-hybrid'
-Bundle 'summerfruit256.vim'
+Bundle 'https://github.com/vim-scripts/summerfruit256'

0 comments on commit 7a504e7

Please sign in to comment.