Replace tmux split editing with kitty split
This commit is contained in:
parent
b3758b0c8e
commit
205558b999
2 changed files with 5 additions and 6 deletions
16
widgets/edit-command-line-split
Normal file
16
widgets/edit-command-line-split
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue