cursive

Issues at: https://git.io/cursive-issues
reefersleep 2020-08-03T08:26:16.092200Z

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?

2020-08-03T11:43:32.093200Z

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..

reefersleep 2020-08-04T07:22:59.096Z

Cheers @manutter51, an extra weapon for the arsenal 🙂

2020-08-04T11:30:09.096300Z

:thumbsup:

2020-08-03T11:44:03.093600Z

(println (clojure.string/replace "Here is some test text." " " "\\s+"))
Here\s+is\s+some\s+test\s+text.

reefersleep 2020-08-03T13:05:37.093700Z

Not exactly what I’m looking for, but it’d be a help. How do I make it available to the REPL?

2020-08-03T13:07:10.093900Z

Once you define it you can use it in either the repl or the editor just by typing as[TAB]

2020-08-03T13:07:30.094100Z

where [TAB] is the TAB key, of course.