]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/snippets/zsh.snippets
Use yellow identifiers instead of red
[rbdr/dotfiles] / vim / snippets / zsh.snippets
1 # #!/bin/zsh
2 snippet #!
3 #!/bin/zsh
4
5 snippet if
6 if ${1:condition}; then
7 ${2:# statements}
8 fi
9 snippet ife
10 if ${1:condition}; then
11 ${2:# statements}
12 else
13 ${3:# statements}
14 fi
15 snippet elif
16 elif ${1:condition} ; then
17 ${2:# statements}
18 snippet for
19 for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do
20 ${3:# statements}
21 done
22 snippet fore
23 for ${1:item} in ${2:list}; do
24 ${3:# statements}
25 done
26 snippet wh
27 while ${1:condition}; do
28 ${2:# statements}
29 done
30 snippet until
31 until ${1:condition}; do
32 ${2:# statements}
33 done
34 snippet repeat
35 repeat ${1:integer}; do
36 ${2:# statements}
37 done
38 snippet case
39 case ${1:word} in
40 ${2:pattern})
41 ${3};;
42 esac
43 snippet select
44 select ${1:answer} in ${2:choices}; do
45 ${3:# statements}
46 done
47 snippet (
48 ( ${1:#statements} )
49 snippet {
50 { ${1:#statements} }
51 snippet [
52 [[ ${1:test} ]]
53 snippet always
54 { ${1:try} } always { ${2:always} }
55 snippet fun
56 function ${1:name} (${2:args}) {
57 ${3:# body}
58 }