Tweak various scripts to improve the time they take to load
As requested in #2152, startup time should be slightly better.
This commit is contained in:
parent
56912dd22c
commit
2a3e3f0514
|
@ -25,7 +25,7 @@ evaluate-commands %sh{
|
||||||
for lang in ${languages}; do
|
for lang in ${languages}; do
|
||||||
printf 'add-highlighter shared/markdown/%s region ```\h*%s\\b ``` regions\n' "${lang}" "${lang}"
|
printf 'add-highlighter shared/markdown/%s region ```\h*%s\\b ``` regions\n' "${lang}" "${lang}"
|
||||||
printf 'add-highlighter shared/markdown/%s/ default-region fill meta\n' "${lang}"
|
printf 'add-highlighter shared/markdown/%s/ default-region fill meta\n' "${lang}"
|
||||||
ref=$([ "${lang}" = kak ] && echo kakrc || echo "${lang}")
|
[ "${lang}" = kak ] && ref=kakrc || ref="${lang}"
|
||||||
printf 'add-highlighter shared/markdown/%s/inner region \A```[^\\n]*\K (?=```) ref %s\n' "${lang}" "${ref}"
|
printf 'add-highlighter shared/markdown/%s/inner region \A```[^\\n]*\K (?=```) ref %s\n' "${lang}" "${ref}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ evaluate-commands %sh{
|
||||||
julia kak kickstart latex lisp lua makefile moon objc \
|
julia kak kickstart latex lisp lua makefile moon objc \
|
||||||
perl pug python ragel ruby rust sass scala scss sh swift \
|
perl pug python ragel ruby rust sass scala scss sh swift \
|
||||||
tupfile yaml; do
|
tupfile yaml; do
|
||||||
ref=$(if [ "$ft" = kak ]; then echo "kakrc"; else echo "$ft"; fi)
|
if [ "$ft" = kak ]; then ref="kakrc"; else ref="$ft"; fi
|
||||||
printf 'add-highlighter shared/restructuredtext/%s region %s %s ref %s\n' "$ft" '\.\.\h*'$ft'::\h*c\h*\n' '^\S' "$ref"
|
printf 'add-highlighter shared/restructuredtext/%s region %s %s ref %s\n' "$ft" '\.\.\h*'$ft'::\h*c\h*\n' '^\S' "$ref"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ evaluate-commands %sh{
|
||||||
types="char double float int long short signed size_t unsigned void"
|
types="char double float int long short signed size_t unsigned void"
|
||||||
values="NULL"
|
values="NULL"
|
||||||
|
|
||||||
join() { printf "%s" "$1" | tr -s ' \n' "$2"; }
|
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
|
||||||
|
|
||||||
# Add the language's grammar to the static completion list
|
# Add the language's grammar to the static completion list
|
||||||
printf '%s\n' "hook global WinSetOption filetype=c %{
|
printf '%s\n' "hook global WinSetOption filetype=c %{
|
||||||
|
@ -212,7 +212,7 @@ evaluate-commands %sh{
|
||||||
nullptr_t ptrdiff_t short signed size_t unsigned void wchar_t"
|
nullptr_t ptrdiff_t short signed size_t unsigned void wchar_t"
|
||||||
values="NULL false nullptr this true"
|
values="NULL false nullptr this true"
|
||||||
|
|
||||||
join() { printf "%s" "$1" | tr -s ' \n' "$2"; }
|
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
|
||||||
|
|
||||||
# Add the language's grammar to the static completion list
|
# Add the language's grammar to the static completion list
|
||||||
printf %s\\n "hook global WinSetOption filetype=cpp %{
|
printf %s\\n "hook global WinSetOption filetype=cpp %{
|
||||||
|
@ -254,7 +254,7 @@ evaluate-commands %sh{
|
||||||
decorators="autoreleasepool catch class end implementation interface
|
decorators="autoreleasepool catch class end implementation interface
|
||||||
property protocol selector synchronized synthesize try"
|
property protocol selector synchronized synthesize try"
|
||||||
|
|
||||||
join() { printf "%s" "$1" | tr -s ' \n' "$2"; }
|
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
|
||||||
|
|
||||||
# Add the language's grammar to the static completion list
|
# Add the language's grammar to the static completion list
|
||||||
printf %s\\n "hook global WinSetOption filetype=objc %{
|
printf %s\\n "hook global WinSetOption filetype=objc %{
|
||||||
|
|
|
@ -40,7 +40,7 @@ evaluate-commands %sh{
|
||||||
types="int bool str regex int-list str-list completions line-specs range-specs"
|
types="int bool str regex int-list str-list completions line-specs range-specs"
|
||||||
values="default black red green yellow blue magenta cyan white yes no false true"
|
values="default black red green yellow blue magenta cyan white yes no false true"
|
||||||
|
|
||||||
join() { printf "%s" "$1" | tr -s ' \n' "$2"; }
|
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
|
||||||
|
|
||||||
# Add the language's grammar to the static completion list
|
# Add the language's grammar to the static completion list
|
||||||
printf '%s\n' "hook global WinSetOption filetype=kak %{
|
printf '%s\n' "hook global WinSetOption filetype=kak %{
|
||||||
|
|
|
@ -19,7 +19,7 @@ evaluate-commands %sh{
|
||||||
readonly return select set shift source test then
|
readonly return select set shift source test then
|
||||||
time type typeset ulimit unalias until while break continue"
|
time type typeset ulimit unalias until while break continue"
|
||||||
|
|
||||||
join() { printf "%s" "$1" | tr -s ' \n' "$2"; }
|
join() { sep=$2; eval set -- $1; IFS="$sep"; echo "$*"; }
|
||||||
|
|
||||||
# Add the language's grammar to the static completion list
|
# Add the language's grammar to the static completion list
|
||||||
printf %s\\n "hook global WinSetOption filetype=sh %{
|
printf %s\\n "hook global WinSetOption filetype=sh %{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user