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