Fork me on GitHub

Encouraged by the comments here, I decided to give Kitty a try. So far it seems great and very snappy even with fonts with ligatures, but there's one detail I can't seem to figure out how to set up - movement by word using option+arrowkey (I'm on Mac OS) using option+f/option+b. More specifically, I can get these to work on the shell itself, by setting up the bindings in zshrc, but not on the Clojure REPL launched via Leiningen or Boot - in the REPL launched by the clj command they do work. In the Lein/Boot REPL, the option-arrow combinations print "3D" (left) or "3C" (right) on the screen, option+f gives "ƒ" and option+b "›". The same is true for other REPLs (like the Python shell) as well. Since the Leiningen and Boot REPLs are launched by Bash, I tried adding the said settings to first /etc/bashrc and then to /etc/profile too. Like this:

bind '"^[[1;3C": forward-word'
bind '"^[[1;3D": backward-word'
As a result the commands work in the Bash shell itself but still not in the REPL. Any ideas how to solve this?


This got finally solved. I created a ~/.inputrc file with the following in it:

"3C": forward-word
"3D": backward-word
For some reason the REPL received the key combinations in that form - plus, I couldn't figure out how to bind them in my ~/.zshrc. Whatever, glad to be bangin' out some parentheses for a change.


Does this work for you?


In the shell yes, but not in the Clojure REPL.


I'm using rebel readline


No, but I tried it. Same thing with it unfortunately


The difference to the basic repl is that here it prints [1;3D instead of 3D when I try to move leftwards by word :thinking_face:


If I hold down ctrl+right/left arrow I can go left/rgith


bindkey '^F' up-line-or-beginning-search
bindkey '^G' down-line-or-beginning-search
bindkey '\e[A' up-line-or-beginning-search
bindkey '\e[B' down-line-or-beginning-search


Hi. I posted this in #beginners but I’m cross posting here in case it’s editor specific.


I cannot seem to get my work environment going. I’m not sure what I’m doing wrong or even what channel to ask about it. I’m using fireplace to connect to cider-nrepl through vim, with a clj based project. Weird things have started happening. I’ve tried a bunch of things but the state right now is that I start the repl server with

clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.21.1"} }}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
as instructed on the cider-nrepl site. I connect with vim using :Connect. The first time I try to connect, I get an error: Vim(return):E15: Invalid Expression:. The second time I try, it seems to work. After I connect, I try to evaluate a simple expression - (+ 1 2). The terminal with the nrepl server prints a stack trace:
nREPL server started on port 52195 on host localhost - 
Exception in thread "nRepl-session-588832b7-43c8-4260-8324-0a14383dac6c" Socket closed
    at nrepl.transport$bencode$fn__427.invoke(transport.clj:116)
    at nrepl.transport.FnTransport.send(transport.clj:41)
    at nrepl.middleware.print$send_nonstreamed.invokeStatic(print.clj:159)
    at nrepl.middleware.print$send_nonstreamed.invoke(print.clj:138)
    at nrepl.middleware.print$printing_transport$reify__818.send(print.clj:174)
    at cider.nrepl.middleware.track_state$make_transport$reify__3988.send(track_state.clj:214)
    at nrepl.middleware.caught$caught_transport$reify__853.send(caught.clj:58)
    at nrepl.middleware.interruptible_eval$evaluate$fn__909.invoke(interruptible_eval.clj:123)
    at clojure.main$repl$fn__9095.invoke(main.clj:460)
    at clojure.main$repl.invokeStatic(main.clj:458)
    at clojure.main$repl.doInvoke(main.clj:368)
    at clojure.lang.RestFn.invoke(
    at nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:79)
    at nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:55)
    at nrepl.middleware.interruptible_eval$interruptible_eval$fn__916$fn__920.invoke(interruptible_eval.clj:142)
    at nrepl.middleware.session$session_exec$main_loop__1017$fn__1021.invoke(session.clj:171)
    at nrepl.middleware.session$session_exec$main_loop__1017.invoke(session.clj:170)
After that though, I can evaluate the simple expression just fine, and the result prints in the editor. It feels like I spend 3 days struggling with tooling for every 1 day writing code. 😞


OK, I updated fireplace, and now when I try to :Connect I get an error: Fireplace: invalid connection string ''


So instead I try :Connect and I get Fireplace: Connection Error: nodename nor servname provided, or not known


nrepl://... not working is a definitely a bug, i'll fix it


Try localhost:52405


Thanks, that worked!