dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit b732e3ef77312cee7d7dcde53df2fe80f4d3a62c
parent f3e1eee65ab3a21c6f1e8702061cedbe86978883
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu,  5 Sep 2019 13:09:46 -0400

vim: more snippets

Former-commit-id: de8aefe7390a749adc48377d569b44cfb29977bd
Diffstat:
Mvim/ultisnips/sh.snippets | 11++++++++++-
Mvim/ultisnips/snippets.snippets | 2+-
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/vim/ultisnips/sh.snippets b/vim/ultisnips/sh.snippets @@ -57,7 +57,7 @@ snippet !bash "Bash shebang" b $0 endsnippet -snippet exists "Check if command exists" w,A +snippet exists "Check if command exists" w if ! command -v ${1:command} &>/dev/null; then echo "$1 not installed." >&2 exit 1 @@ -71,4 +71,13 @@ die() { exit 1 } $0 + +snippet func "Function definition" b +${1:function_name}() { + $0 +} +endsnippet + +snippet trap "Exit trap" b +trap ${1:cleanup_function} INT TERM EXIT endsnippet diff --git a/vim/ultisnips/snippets.snippets b/vim/ultisnips/snippets.snippets @@ -1,4 +1,4 @@ -snippet skel "Snippet skeleton" b +snippet snip "Snippet skeleton" b snippet ${1:name} "${2:Description}" ${3:b,w,i,A} ${4:contents} `echo endsnippet`