How can I search a string in vim and thereby ignoring any whitespace (or particularly line breaks) between any characters?
And probably thereby making a function that can search ignoring all whitespace.
I found a way to ignore whitespace in regex. No really elegant. Just insert
\s* between any character. So therefor making this a function would be really needed.
I also have found a way to search around line breaks in vim:
vim search around line breaks
However the last link gives a solution only if the line break is there were a space was. However I want to ignore all whitespace.
So when I search helloworld here:
blabla blalba hell oworld bla bla h elloworl bla bla
It should match it twice, despite the line breaks.
I thought I basically need to alter the function from the vim link a bit which changes the search to:
But I have not idea how to do alter the function for that.