Fork me on GitHub
#calva
<
2020-07-16
>
e74900: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

brandon.ringe18: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.

brandon.ringe18: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.

e74900:07:34

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

e74900:07:58

i niavely assumed the usual vscode commands could be applied

e74900: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.

e74909:07:17

:+1: makes sense esp. given that it's separate

trhtom20:07:39

@ 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.

trhtom20:07:09

With what command? Calva evaluate current form?

trhtom20: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.