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{ ## 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="" filetype=""
notify-send "$kak_hook_param" ext="$kak_hook_param_capture_1"
case "$kak_hook_param_cature_N" in filetype=""
kdl) if [ "$ext" = "py" ]; then
filetype="kdl"
;;
toml)
filetype="toml"
;;
py)
filetype="python" filetype="python"
;; else
ini) filetype="$ext"
filetype="ini" fi
;;
esac
echo "set-option buffer filetype $filetype" echo "set-option buffer filetype $filetype"
} }
}