Replace tmux split editing with kitty split

This commit is contained in:
crater2150 2023-05-30 10:50:45 +02:00
parent b3758b0c8e
commit 205558b999
2 changed files with 5 additions and 6 deletions

View file

@ -0,0 +1,16 @@
edit-command-line-tmux() {
local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
print -R - "$PREBUFFER$BUFFER" >$tmpfile
exec </dev/tty
if [[ $KITTY_WINDOW_ID ]]; then
kitty @launch --type overlay vim -c 'set laststatus=0 showtabline=0 ft=zsh' $tmpfile
tail -f --pid=$(pgrep -f "vim.*${tmpfile:t}") /dev/null
else
${=${VISUAL:-${EDITOR:-vi}}} $tmpfile
fi
print -Rz - "$(<$tmpfile)"
command rm -f $tmpfile
zle send-break # Force reload from the buffer stack
}