Fork me on GitHub
#calva
<
2020-07-16
>
ikrimael00:07:29

how does one make keyboard shortcuts apply to the repl? ex: i have alt+backspace mapped to delete a subword at a time in vscode

bringe18:07:09

I assume by repl, you're referring to the repl window. The action you describe sounds like the paredit action Kill/Delete Sexp Backward, which is mapped by default to ctrl+alt+backspace . Force Delete Backward is mapped to alt+backspace. If you re-mapped alt+backspace to Kill/Delete Sexp Backward, then it should work that way in the repl window.

bringe18:07:44

Btw, I did the re-mapping described above and verified it works in the repl window. Let me know if I misunderstood something or you need more help.

ikrimael00:07:34

ah, i guess the repl has it's own set of commands

ikrimael00:07:58

i niavely assumed the usual vscode commands could be applied

ikrimael00:07:13

(the specific one in question is an extension that deletes subwords e.g. ThisSubword| + "Alt-Bckspc" => This

pez08:07:50

The REPL window is a separate editor. It shares paredit commands with the regular editor, but not much more than that. Most often you shouldn't really need the REPL window though. It's generally better to work inside the editor windows and enjoy the full vscode editing support.

ikrimael09:07:17

👍 makes sense esp. given that it's separate

Tom Helmuth20:07:39

@U0ETXRFEW How would you recommend trying out a function you just wrote if not in the REPL window?

pez20:07:43

I write a comment form below the function and try it out from there.

Tom Helmuth20:07:09

With what command? Calva evaluate current form?

Tom Helmuth20:07:56

I find that annoying, because my cursor is usually in the middle of the code when I want to evaluate it, not at the end of the form.

pez06:07:25

With evaluate current top level form.

Tom Helmuth18:07:29

Thanks!

👍 3