]> git.madduck.net Git - etc/vim.git/blob - .vim/snippets/zsh.snippets

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

check in mediawiki syntax/ftplugin from wikipedia
[etc/vim.git] / .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         }