This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-03
Channels
- # announcements (63)
- # asami (29)
- # beginners (23)
- # calva (23)
- # cider (18)
- # clj-kondo (12)
- # clojure (156)
- # clojure-europe (30)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-uk (6)
- # clojurescript (14)
- # conjure (26)
- # cursive (8)
- # datalog (143)
- # datascript (1)
- # datomic (6)
- # duct (2)
- # emacs (50)
- # events (4)
- # figwheel-main (6)
- # fulcro (7)
- # graphql (12)
- # jobs (6)
- # malli (1)
- # mid-cities-meetup (2)
- # off-topic (4)
- # pathom (6)
- # portal (7)
- # re-frame (10)
- # reagent (8)
- # reitit (10)
- # releases (1)
- # reveal (18)
- # shadow-cljs (39)
- # sql (4)
- # tools-deps (36)
- # vim (25)
- # xtdb (6)
This is really more of an IntelliJ question, but perhaps someone here has an idea about this, since it’s relevant in a Clojure context. In the interest of keeping lines short, I might sometimes break up a string literal in more than one line, eg.
"This is my
multiline string"
If I were to search for this in IntelliJ, I’d normally just use “Find in Path” (CMD F on Mac). However, if I typed this into the search field, I would find nothing: This is my multiline
. I’d have to turn regex on and search for This is my\s*multiline
. However, since I won’t know where line breaks are, I’d really have to search for This\s*is\s*my\s*multiline
.
This becomes really cumbersome really quick!
I wonder if there’s a way to assume or specify that each space in a search represents \s*
? Or some other, smart way to search for this type of literal?I don’t know any way to directly do what you want, but you could set up a Live Template that would make it easy to generate your search string in a REPL..
Not exactly what I’m looking for, but it’d be a help. How do I make it available to the REPL?
Once you define it you can use it in either the repl or the editor just by typing as[TAB]
where [TAB]
is the TAB key, of course.
Cheers @U06CM8C3V, an extra weapon for the arsenal 🙂
:thumbsup:
(println (clojure.string/replace "Here is some test text." " " "\\s+"))
Here\s+is\s+some\s+test\s+text.