AutoYADM commit: 2025-05-18 16:35:23

This commit is contained in:
Daniel Fichtinger 2025-05-18 16:35:24 -04:00
parent 7e6f7d0e4c
commit 449bde13ad

View file

@ -1,19 +1,16 @@
hook global BufCreate .*[.](.*)##hostname[.].* %sh{
filetype=""
notify-send "$kak_hook_param"
case "$kak_hook_param_cature_N" in
kdl)
filetype="kdl"
;;
toml)
filetype="toml"
;;
py)
filetype="python"
;;
ini)
filetype="ini"
;;
esac
echo "set-option buffer filetype $filetype"
## handle YADM special files
## If there's a filename.ext##somestuff,
## we treat the extension as the file type
hook global BufCreate .*[.](.*)##.* %{
evaluate-commands %sh{
filetype=""
ext="$kak_hook_param_capture_1"
filetype=""
if [ "$ext" = "py" ]; then
filetype="python"
else
filetype="$ext"
fi
echo "set-option buffer filetype $filetype"
}
}