mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-12 00:14:18 +00:00
Last commit before tagging and releasing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: !env
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: #!/usr/bin/env
|
||||
# --
|
||||
#!/usr/bin/env ${1:${TM_SCOPE/(?:source|.*)\.(?:(shell)|(\w+)).*/(?1:bash:$2)/}}
|
||||
0
extras/imported/shell-script-mode/.yas-make-groups
Normal file
0
extras/imported/shell-script-mode/.yas-make-groups
Normal file
10
extras/imported/shell-script-mode/Idioms/Tempfile.yasnippet
Normal file
10
extras/imported/shell-script-mode/Idioms/Tempfile.yasnippet
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: temp
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Tempfile
|
||||
# --
|
||||
${1:TMPFILE}="$(mktemp -t ${2:`echo "${TM_FILENAME%.*}" | sed -e 's/[^a-zA-Z]/_/g' -e 's/^$/untitled/'`})"
|
||||
${3:${4/(.+)/trap "/}${4:rm -f '\$${1/.*\s//}'}${4/(.+)/" 0 # EXIT
|
||||
/}${5/(.+)/trap "/}${5:rm -f '\$${1/.*\s//}'; exit 1}${5/(.+)/" 2 # INT
|
||||
/}${6/(.+)/trap "/}${6:rm -f '\$${1/.*\s//}'; exit 1}${6/(.+)/" 1 15 # HUP TERM
|
||||
/}}
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: for
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: for … done
|
||||
# --
|
||||
for (( i = 0; i < ${1:10}; i++ )); do
|
||||
${0:#statements}
|
||||
done
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: forin
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: for … in … done
|
||||
# --
|
||||
for ${1:i}${2/.+/ in /}${2:words}; do
|
||||
${0:#statements}
|
||||
done
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: until
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: until … done
|
||||
# --
|
||||
until ${2:[[ ${1:condition} ]]}; do
|
||||
${0:#statements}
|
||||
done
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: while
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: while … done
|
||||
# --
|
||||
while ${2:[[ ${1:condition} ]]}; do
|
||||
${0:#statements}
|
||||
done
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: case
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: case … esac
|
||||
# --
|
||||
case ${1:word} in
|
||||
${2:pattern} )
|
||||
$0;;
|
||||
esac
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: elif
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: elif …
|
||||
# --
|
||||
elif ${2:[[ ${1:condition} ]]}; then
|
||||
${0:#statements}
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: if
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: if … fi
|
||||
# --
|
||||
if ${2:[[ ${1:condition} ]]}; then
|
||||
${0:#statements}
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: here
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: Here Document
|
||||
# --
|
||||
<<-${2:'${1:TOKEN}'}
|
||||
$0
|
||||
${1/['"`](.+)['"`]/$1/}
|
||||
Reference in New Issue
Block a user