Split kakoune windows with tmux

Hello,
I was using those both commands to split the buffer in both windows with tmux but it seems it has been changed :

:tmux-new-horizontal
:tmux-new-vertical

Please how to reproduce the same with I guess tmux-repl-horizontal and tmux-repl-vertical ?
Is it possible to find it documented somewhere ?
Regards

Hello,

the tmux-new-... have been replaced with tmux-terminal-... which runs an arbitrary shell command inside a tmux pane instead of runnning a kakoune client, so tmux-new-horizontal would now be tmux-terminal-horizontal kak -c %val{session}. This was done to generalize the new alias into a terminal one.

Thanks, this is working as before with those line in kakrc ((user key) + (/ or =) to split) :

map global user / ‘:tmux-terminal-horizontal kak -c %val{session}<ret>’ -docstring ‘Split horizontal’
map global user = ‘:tmux-terminal-vertical kak -c %val{session}<ret>’ -docstring ‘Split vertical’

Do you know where we could update this information to make it more easy to set for new comers ? (the previous setting was more obvious because we just have to do the command without parameters)

1 Like

Do you need to escape the flag -c? Adding these lines to my kakrc leads to this error: “‘map’ unknown option ‘-c’”.

define-command -docstring "vsplit [<commands>]: split tmux vertically" \
vsplit -params .. -command-completion %{
    tmux-terminal-horizontal kak -c %val{session} -e "%arg{@}"
}

define-command -docstring "split [<commands>]: split tmux horizontally" \
split -params .. -command-completion %{
    tmux-terminal-vertical kak -c %val{session} -e "%arg{@}"
}

define-command -docstring "tabnew [<commands>]: create new tmux window" \
tabnew -params .. -command-completion %{
    tmux-terminal-window kak -c %val{session} -e "%arg{@}"
}

Then you can map these commands.

2 Likes