This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-14
Channels
- # adventofcode (42)
- # babashka (37)
- # beginners (62)
- # cider (13)
- # clj-kondo (12)
- # cljdoc (1)
- # clojure (80)
- # clojure-australia (2)
- # clojure-dev (43)
- # clojure-europe (69)
- # clojure-italy (8)
- # clojure-nl (10)
- # clojure-switzerland (130)
- # clojure-uk (12)
- # clojurescript (23)
- # code-reviews (8)
- # cryogen (5)
- # cursive (6)
- # datomic (3)
- # duct (4)
- # emacs (12)
- # fulcro (60)
- # kaocha (7)
- # lambdaisland (4)
- # malli (4)
- # meander (1)
- # nrepl (31)
- # off-topic (2)
- # re-frame (16)
- # rewrite-clj (5)
- # shadow-cljs (11)
- # spacemacs (7)
- # xtdb (1)
Forgive me if this is a common question, but how can I wrap an expression in [] with spacemacs and evil-lisp-state? I know that SPC + k + w wraps in parens but can't figure out how to wrap in other Clojure forms
If it's already wrapped with ()
you can use , r c [
to convert it to a vector.
Or you can use the y s
motion (read "you surround" 🙂 )
E.g. y s $ [
surrounds everything from the current position till the end of line with []
I usually do SPC v
to select a word, s to surround with a character, ]
to surround with square brackets without a space, or [
to include a space.
Hmm, v e
would also work if you are at the start of the word and is the only word to be surrounded. SPC v
is nice as you can keep on expanding the selection with v
, eg. SPC v v v V
and shift-v to shrink the selection.
I use SPC v
with ~
when I want to capitalise words, its very handy.
Thanks @U06BE1L6T and @U05254DQM! That's exactly what I was looking for