spacemacs

jumar 2021-11-04T09:22:10.042200Z

Is there an easy way to switch key-value pairs in a map? Like sp-transpose-sexp but for key-value pairs, not just single thing. E.g. to go from {:a 1 :c 2} to {:c 2 :a 1} via a single keystroke

jumar 2021-11-05T07:04:33.044100Z

@invertisment_clojuria sorry if my example was confusing. I want to be able to switch order of adjacent key-value pairs. So for example (`|` is the position of my cursor)

{:a 1 ... :x 10 | :y 11 :z 100}
would be transformed to
{:a 1 ... :y 11 :x 10 :z 100}
by this mysterious emacs function.

šŸ‘€ 1
jumar 2021-11-05T07:05:16.044300Z

The same for let bindings as @lee demonstrated with the Calva feature

Martynas Maciulevičius 2021-11-04T17:35:28.042500Z

And what if you'd have {:a 1 :b 2 :c 3} ?

lread 2021-11-04T20:06:15.043800Z

FWIW, there is a drag feature in Calva which kinda sorta sounds maybe related? https://calva.io/paredit/#drag-bindings-forwardbackward

Martynas Maciulevičius 2021-11-04T17:49:09.043400Z

Is there a way to fix treemacs not displaying git changed file colors? Or is it a bug?