aboutsummaryrefslogtreecommitdiff
path: root/files/.vim/UltiSnips/sh.snippets
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-08-29 00:17:28 +0500
committerAnton Bobov <anton@bobov.name>2024-08-29 00:17:28 +0500
commit6c306d96bb4aa703d40bfa3ddfc3f919ed1127af (patch)
tree294d68c8bf2e34b335ef93ac3f8fa32e214b48d1 /files/.vim/UltiSnips/sh.snippets
parent456a50528edd2ade497bb0611269189f7d5ef461 (diff)
vim: Update snippets
Diffstat (limited to 'files/.vim/UltiSnips/sh.snippets')
-rw-r--r--files/.vim/UltiSnips/sh.snippets25
1 files changed, 25 insertions, 0 deletions
diff --git a/files/.vim/UltiSnips/sh.snippets b/files/.vim/UltiSnips/sh.snippets
index 6cedc37..b06337f 100644
--- a/files/.vim/UltiSnips/sh.snippets
+++ b/files/.vim/UltiSnips/sh.snippets
@@ -38,3 +38,28 @@ endsnippet
snippet usage
echo "Usage: ${0##*/}"
endsnippet
+
+snippet colors
+GREEN='\033[0;32m'
+RED='\033[0;31m'
+RESET_COLOR='\033[0m'
+
+echo -e "${GREEN}Yay!${RESET_COLOR}"
+echo -e "${RED}Error!${RESET_COLOR}"
+endsnippet
+
+snippet green
+echo -e "${GREEN}${1}${RESET_COLOR}"
+endsnippet
+
+snippet red
+echo -e "${RED}${1}${RESET_COLOR}"
+endsnippet
+
+snippet main
+main() {
+ $0
+}
+
+main "$@"
+endsnippet