AutoYADM commit: 2025-05-18 16:35:23
This commit is contained in:
parent
7e6f7d0e4c
commit
449bde13ad
1 changed files with 15 additions and 18 deletions
|
@ -1,19 +1,16 @@
|
||||||
hook global BufCreate .*[.](.*)##hostname[.].* %sh{
|
## handle YADM special files
|
||||||
filetype=""
|
## If there's a filename.ext##somestuff,
|
||||||
notify-send "$kak_hook_param"
|
## we treat the extension as the file type
|
||||||
case "$kak_hook_param_cature_N" in
|
hook global BufCreate .*[.](.*)##.* %{
|
||||||
kdl)
|
evaluate-commands %sh{
|
||||||
filetype="kdl"
|
filetype=""
|
||||||
;;
|
ext="$kak_hook_param_capture_1"
|
||||||
toml)
|
filetype=""
|
||||||
filetype="toml"
|
if [ "$ext" = "py" ]; then
|
||||||
;;
|
filetype="python"
|
||||||
py)
|
else
|
||||||
filetype="python"
|
filetype="$ext"
|
||||||
;;
|
fi
|
||||||
ini)
|
echo "set-option buffer filetype $filetype"
|
||||||
filetype="ini"
|
}
|
||||||
;;
|
|
||||||
esac
|
|
||||||
echo "set-option buffer filetype $filetype"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue