Fork me on GitHub
#calva
<
2023-05-06
>
cmdrdats17:05:18

Is there a way to expand selection to the next form instead of just expanding out? ie (|a| b c d) -> (|a b| c d) -> (|a b c| d) instead of (|a| b c d) -> (|a b c d|) -> |(a b c d)| - It's one of the thing I miss most after switch from emacs, particularly when selecting and cutting pairs in let bindings or maps

pez18:05:58

We should expand a bit smarter in bindings. What you can do is to select forward sexpr. It works like you describe there. And it also pushes on the expand selection stack so you can shrink it back if you select too far.

cmdrdats18:05:55

thank you 🙏

🙏 2
pez18:05:53

I forgot to mention that this is general for all Paredit movement. There is a corresponding selection, and the default keybindings are to add shift to the movement binding. One such move+select command that is a bit extra important to know about is select-backward-up, which goes well together with the command for evaluating the selection, closing brackets (default bindings ctrl+alt+enter).

cmdrdats18:05:30

awesome, thank you 😄 I saw all the other bindings when I went to set this up 😄 personally, I mostly just use eval top level form (and very recently, eval and replace with result for some helper functions)... I try to keep my shortcut key headspace very minimal 🙈