aboutsummaryrefslogtreecommitdiff
path: root/modules/vim/vim.dot.link/snippets/sh.snippets
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-01 01:25:10 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-02-01 01:25:10 -0200
commit6b9187673ee62d11042832f938913f15131592a7 (patch)
tree9e70016667efe273a72ab351aafaddbdb099e123 /modules/vim/vim.dot.link/snippets/sh.snippets
parent25235935e6c90557a4d6791c8d8f3a5cdf89681a (diff)
downloaddotfiles-6b9187673ee62d11042832f938913f15131592a7.tar.gz
dotfiles-6b9187673ee62d11042832f938913f15131592a7.tar.bz2
Adding metadot script
Diffstat (limited to 'modules/vim/vim.dot.link/snippets/sh.snippets')
-rw-r--r--modules/vim/vim.dot.link/snippets/sh.snippets28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/vim/vim.dot.link/snippets/sh.snippets b/modules/vim/vim.dot.link/snippets/sh.snippets
new file mode 100644
index 0000000..f035126
--- /dev/null
+++ b/modules/vim/vim.dot.link/snippets/sh.snippets
@@ -0,0 +1,28 @@
+# #!/bin/bash
+snippet #!
+ #!/bin/bash
+
+snippet if
+ if [[ ${1:condition} ]]; then
+ ${2:#statements}
+ fi
+snippet elif
+ elif [[ ${1:condition} ]]; then
+ ${2:#statements}
+snippet for
+ for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do
+ ${3:#statements}
+ done
+snippet wh
+ while [[ ${1:condition} ]]; do
+ ${2:#statements}
+ done
+snippet until
+ until [[ ${1:condition} ]]; do
+ ${2:#statements}
+ done
+snippet case
+ case ${1:word} in
+ ${2:pattern})
+ ${3};;
+ esac