myhome/.config/nvim/plugged/bash-support.vim/bash-support/templates/statements.templates
Marcin Woźniak fc7dc3f34a
Added bash-support
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2020-11-16 12:54:24 +01:00

80 lines
2.0 KiB
Plaintext

§ =============================================================
§ Statements
§ =============================================================
== Statements.case == map:sc, shortcut:c ==
case <CURSOR> in
)
;;
)
;;
*)
;;
esac # --- end of case ---
== Statements.elif == map:sei, shortcut:e ==
elif <CURSOR> ; then
== Statements.for-in == map:sf, shortcut:f ==
for <CURSOR> in ; do
<SPLIT><-LOOP_BODY->
done
== Statements.for == map:sfo, shortcut:f ==
for (( CNTR=0; CNTR<<CURSOR>0; CNTR+=1 )); do
<SPLIT><-LOOP_BODY->
done
== Statements.if == map:si, shortcut:i ==
if <CURSOR> ; then
<SPLIT><-IF_PART->
fi
== Statements.if-else == map:sie, shortcut:i ==
if <CURSOR> ; then
<SPLIT><-IF_PART->
else
<+ELSE_PART+>
fi
== Statements.select == map:ss, shortcut:s ==
select <CURSOR> in ; do
<SPLIT>done
== Statements.until == map:su, shortcut:u ==
until <CURSOR> ; do
<SPLIT>done
== Statements.while == map:sw, shortcut:w ==
while <CURSOR> ; do
<SPLIT>done
== Statements.function == map:sfu, shortcut:f ==
function |?FUNCTION_NAME| ()
{
<CURSOR><SPLIT>
} # ---------- end of function |FUNCTION_NAME| ----------
== ENDTEMPLATE ==
§ -------------------------------------------------------------
== SEP: Statements.sep-print ==
== Statements.echo == insert, map:se, shortcut:e ==
echo -e "<CURSOR><SPLIT>"
== Statements.printf == insert, map:sp, shortcut:p ==
printf "%s\n" <CURSOR><SPLIT>
== ENDTEMPLATE ==
§ -------------------------------------------------------------
== SEP: Statements.sep-array ==
== Statements.array element == insert, map:sae, shortcut:a ==
${<CURSOR><SPLIT>[]}
== Statements.array elements, all == insert, map:saa, shortcut:a ==
${<CURSOR><SPLIT>[@]}
== Statements.array elements, string == insert, map:sas, shortcut:s ==
${<CURSOR><SPLIT>[*]}
== Statements.subarray == insert, map:ssa, shortcut:s ==
${<CURSOR><SPLIT>[@]::}
== Statements.no of element == insert, map:san, shortcut:n ==
${#<CURSOR><SPLIT>[@]}
== Statements.array indices== insert, map:sai, shortcut:i ==
${!<CURSOR><SPLIT>[@]}
== ENDTEMPLATE ==