Skip to content

Searching line-wrapped paragraphs #2485

Answered by BurntSushi
jeanas asked this question in General
Discussion options

You must be logged in to vote

I also run into this problem occasionally, but it's not just because of paragraphs. It also happens with, for example, string literals. In Rust:

let foo =
    "This string is \
     split across \
     multiple lines.";

And in Go:

foo := "this string is" +
    "split across" +
    "multiple lines"

And in this case, the suggested paragraph mode doesn't really work. Indeed, there really isn't a single approach for how string literals might be wrapped. But I run into this sort of case myself too.

To be honest, what I usually do is just change my query to use fewer words under the assumption that there is a break between them somewhere. And that usually solves my problem. Your solution for pa…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jeanas
Comment options

@jeanas
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants