This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-06
Channels
- # announcements (7)
- # aws (8)
- # babashka (9)
- # babashka-sci-dev (11)
- # beginners (37)
- # calva (50)
- # cider (15)
- # clj-kondo (30)
- # clj-otel (3)
- # cljdoc (16)
- # cljs-dev (26)
- # cljsrn (4)
- # clojure (168)
- # clojure-doc (1)
- # clojure-europe (17)
- # clojure-gamedev (4)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-spec (17)
- # clojure-uk (16)
- # clojurescript (27)
- # community-development (3)
- # css (3)
- # cursive (9)
- # datomic (25)
- # emacs (1)
- # events (4)
- # fulcro (2)
- # google-cloud (2)
- # graphql (11)
- # gratitude (9)
- # humbleui (16)
- # hyperfiddle (2)
- # jobs (1)
- # london-clojurians (1)
- # lsp (16)
- # malli (2)
- # off-topic (71)
- # pedestal (4)
- # polylith (9)
- # portal (94)
- # reagent (6)
- # reitit (2)
- # releases (1)
- # remote-jobs (2)
- # sci (9)
- # shadow-cljs (49)
- # spacemacs (8)
- # tools-build (2)
- # tools-deps (39)
- # vim (7)
- # xtdb (6)
how do you guys usually paste a form into another form?
p
but maybe you're looking for something like wrap in parens? vimsexp (and vimsexp for humans) give a lot of paren manipulation objects and movements.
Sometimes I go to end of the form, insert a new line, adjust the indent to my preferred level, exit insert mode, and the paste with [p
. Now that I type it out, sounds so convoluted lol but I haven't got my indent settings quite how I like them otherwise, and I have the muscle memory for this one.
@UPWHQK562 that’s just what I mean. I have tpope’s vim-sexp bindings installed.
(yank this form)
(paste
end
of
this)
So I can yaf
the first form, and then… I could nav to the second one, type >I
to open insert mode at the end of the second form, enter a newline, exit insert mode, then paste with =p
. Perhaps I’m spoiled by all the neat stuff you can do with structural editing with vim-sexp etc but this seems rather unwieldy.I could also move to the last line of target form, paste linewise, slurp, and reformat
that’s not too bad I guess.
Also not great that if pasting into a one line form, yaf
doesn’t paste with spaces around it (which would be analogous to yaw
in vanilla vim)