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
|
||||
## If there's a filename.ext##somestuff,
|
||||
## we treat the extension as the file type
|
||||
hook global BufCreate .*[.](.*)##.* %{
|
||||
evaluate-commands %sh{
|
||||
filetype=""
|
||||
notify-send "$kak_hook_param"
|
||||
case "$kak_hook_param_cature_N" in
|
||||
kdl)
|
||||
filetype="kdl"
|
||||
;;
|
||||
toml)
|
||||
filetype="toml"
|
||||
;;
|
||||
py)
|
||||
ext="$kak_hook_param_capture_1"
|
||||
filetype=""
|
||||
if [ "$ext" = "py" ]; then
|
||||
filetype="python"
|
||||
;;
|
||||
ini)
|
||||
filetype="ini"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
filetype="$ext"
|
||||
fi
|
||||
echo "set-option buffer filetype $filetype"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue