This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-07
Channels
- # announcements (2)
- # babashka (18)
- # beginners (45)
- # bristol-clojurians (1)
- # calva (2)
- # cider (8)
- # clara (8)
- # clj-kondo (4)
- # cljdoc (6)
- # clojure (69)
- # clojure-chennai (1)
- # clojure-dev (21)
- # clojure-europe (3)
- # clojure-gamedev (3)
- # clojure-india (1)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-spec (7)
- # clojure-uk (70)
- # clojurescript (122)
- # cloverage (5)
- # cursive (2)
- # data-science (3)
- # fulcro (21)
- # graalvm (3)
- # graphql (14)
- # jackdaw (2)
- # jobs (2)
- # lumo (2)
- # malli (1)
- # mount (1)
- # off-topic (22)
- # re-frame (2)
- # reitit (5)
- # ring (7)
- # shadow-cljs (47)
- # spacemacs (11)
- # tools-deps (127)
- # vim (16)
- # xtdb (9)
Does anyone know of a way to align clojure map k/v pairs? I’ve used Tabularize for aligning other types of files, but I was hoping for something like clojure-align
in emacs’ clojure-mode
i just had a shower thought that https://github.com/borkdude/edamame could potentially be used to find the last column of every key in the map, determine what column every value should start on, and adjust the values accordingly
i guess you would also need to figure out what selection of text to send through edamame, or otherwise maybe parse the entire file and then somehow find where your cursor is in the output
it's funny how a feature that feels so simple on the surface is actually so complex underneath 🙂
I’ve always used gq
, but:
gw{motion} Format the lines that {motion} moves over. Similar to
gq but puts the cursor back at the same position in
the text. However, 'formatprg' and 'formatexpr' are
not used.
@borkdude may be this explains gw
and gq
? https://vi.stackexchange.com/a/511