Closed listentolist closed 3 years ago
When working on a script that uses connect.kak it is useful to be able to test parts of it by sending it to a connected REPL. It would be just convenient if I can simply use the repl-send-text
command for that. Furthermore when having a connected terminal one can edit a long command in a scratch buffer and send it to the terminal.
But when you use the REPL, you use the connect.kak’s features?
Yes. For example when writing a plugin that uses connect.kak commands I can run connect-repl bash
in Kakoune and interactively test parts of it by sending a selection to the connected REPL.
I hesitate to merge it. We have the >
(connect-terminal
) and $
(connect-shell
) commands. I would like to unify the implementations and make a connected terminal or program a REPL at any time.
@listentolist Can you test the latest commit 5ad59e5201d21ac1221be7c373bd25623efe8337 and implementation?
Thank you! connect repl-new
works as expected.
Very happy with that.
We can now use the explicit:
connect tmux-terminal-horizontal
and all other flavors.
Yes. For example when writing a plugin that uses connect.kak commands I can run
connect-repl bash
in Kakoune and interactively test parts of it by sending a selection to the connected REPL.
I was also using it a lot. As a repl for bash scripts for example. :fifo
is just great. Also as a connected repl for compilation: $(:get %opt{makecmd}) `:it`
I’ve added the
@
(think kitty’s REPL) command, alongside the+
popup command.Example – Open a connected Janet REPL:
@ janet
Example – Open files with fzf in a popup window:
+ :fzf
Default popup handling is very nice. I had this in my kakrc
:
define-command fzf-files -override -params .. -file-completion -docstring 'Open files with fzf' %{
terminal-set global kitty kitty-terminal-tab kitty-focus
> :fzf-files %arg{@}
terminal-set global x11 x11-terminal x11-focus
}
define-command fzf-buffers -override -params ..1 -buffer-completion -docstring 'Open buffers with fzf' %{
terminal-set global kitty kitty-terminal-tab kitty-focus
> :fzf-buffers %arg{@}
terminal-set global x11 x11-terminal x11-focus
}
Connected repls are also useful.
How connect.kak can leverage the use of a REPL?