Fork me on GitHub
#spacemacs
<
2022-04-26
>
Drew Verlee20:04:23

What would allow for movement? Where my mouse is at and i want to go to *. Basically i'm one clojure hashmap key and i want to jump to the space to make another one?

{a* b **}
Space k <?>

Drew Verlee20:04:07

sp-end-of-sexp works if it's the last one...

Drew Verlee20:04:10

i guess i could just tab it down and start another item right there :0

Drew Verlee20:04:19

probably need at least two commands, i'm just over thinking it. 1. go to the next item then 2 insert new.

Martynas Maciulevičius11:04:01

You could try Ea<space> to insert: {:hell[o] :one-thing :second :thing} -> {:hello :one-thing | :second :thing}

Martynas Maciulevičius11:04:55

Also if you have newlines after each key-value pair the insertion is even simpler, just press A . I also like to use o and O very much.

practicalli-johnny11:04:05

@U0DJ4T5U1 if using Evil style editing, in normal mode ] will jump to the end of the next value in key/value pair within a hash-map (`evil-cp-next-closing` ) [ will jump to the start of the previous value in a key/value pair within a hash-map (`evil-cp-previous-opening`)

👍 1
Martynas Maciulevičius11:04:43

I use develop and I don't have function evil-cp-next-closing . Do I need to do something to get it? Also ] does nothing but ]] jumps to a next paragraph

Martynas Maciulevičius12:04:20

I think this is your plugin: https://github.com/luxbock/evil-cleverparens But I use } quite a bit when moving. So I'll have to read the docs.

Drew Verlee14:04:19

I'll give those both a try. Thanks!

Drew Verlee23:04:22

I'm using spacmemacs with evil, more specifically just a moded version of johns spacemacs init file 🙂 . With that ] jumps foward, but not to the next key. So maybe i'm not in "Evil styl editing? I can do "next symbol" then closing though. Which is fine.

Drew Verlee23:04:31

This is why i mostly move around with vim keybindings, because even the half second of concentrated thought isn't worth the keystrokes.