folding adjusted for use with origami.el

This commit is contained in:
Jaromil 2016-02-11 13:06:54 +01:00
parent c3adf9d355
commit 9df91767f8
1 changed files with 27 additions and 1 deletions

28
zuper
View File

@ -1,4 +1,5 @@
#!/usr/bin/env zsh
## -*- origami-fold-style: triple-braces -*-
#
# Zuper - Zsh Ultimate Programmer's Extensions Refurbished
#
@ -32,6 +33,8 @@ arrs=(req freq)
vars+=(zuper_version)
zuper_version=0.2
# {{{ Messaging
# Messaging function with pretty coloring
autoload colors
colors
@ -128,6 +131,9 @@ function _print() {
return 0
}
# }}} Messaging
# {{{ Debugging
fn() {
fun="$@"
@ -236,6 +242,10 @@ endgame() {
# unlike TRAPEXIT, the zshexit() hook is not called when functions exit.
zshexit() { endgame EXIT; return $? }
# }}} Debugging
# {{{ Tempfiles
##########################
# Temp file handling
@ -262,6 +272,10 @@ _ztmp_destructor() {
arrs+=(tmpfiles)
destruens+=(_ztmp_destructor)
# }}} Tempfiles
# {{{ Strings
# tokenizer, works only with one char length delimiters
# saves everything in global array tok=()
arrs+=(tok)
@ -289,6 +303,12 @@ strtok() {
[[ "$t" == "" ]] || tok+=($t)
}
# TODO: move in here some helpers
# }}} Strings
# {{{ Key/Value filesave
# optional: define zkv=1 on source
[[ "$zkv" = "" ]] || {
@ -358,6 +378,10 @@ EOF
}
# }}} Key/Value filesave
# {{{ Get/Set REST API
# optional: define restful=1 on source
[[ "$restful" = "" ]] || {
@ -471,6 +495,8 @@ EOF
}
# }}} Get/Set REST API
# {{{ Helpers
[[ "$helpers" = "" ]] || {
@ -700,4 +726,4 @@ BEGIN { found=0 }
}
# }}}
# }}} Config