5

None of the suggestions found here work, nor does a search on issues in the repo turn up anything.

I'd like to replace all >< with >\r\n< inside a selection

'<,'>s/></?/g

what goes in place of the question mark?

Community
  • 1
  • 1
Maslow
  • 17,665
  • 17
  • 96
  • 181

2 Answers2

1

Does this work for you?

:'<,'>s/></>\r</g

Are you on windows and trying to insert both (literal) \r (carriage return) and \n (new line) ?

ffledgling
  • 9,644
  • 8
  • 40
  • 65
0

I just had success a moment ago moving asterisks to the start of a new line (i.e. replace asterisk chars with newline + asterisk) with:

:%s/\*/\r*/g

for clarity, that's:

:%s   (replace in whole file)
\*    (literal asterisk)
\r*   (new line followed by literal asterisk)
g     (operate on all matches on any given line)
Neil Barnwell
  • 38,622
  • 28
  • 141
  • 213