How do I convert (or paste) a plaintext file to OpenOffice document, so that tabs become indents?

Currently, dynamically wrapped long lines which start with a tab are only indented (by that tab) before the wrap. But after the wrap the lines are not indented at all.

Additional question: what about converting single newlines to soft returns and multiple newlines to hard returns?

Thank you.

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Single newlines (cr lf) to soft returns (line breaks);

Ctrl+F, More options, "Regular expressions"
Find: \r\n
Replace with: \n

2 newlines (line breaks) to one hard return (cr lf);

Ctrl+F, More options, "Regular expressions"
Find: \n\n
Replace with: \r\n
link|improve this answer
Hm, now I realize that I marked an answer correct, even when the main question wasn't answered. Should I rename the question title to that additional question, Or should I unmark the answer as correct? – java.is.for.desktop Feb 14 '10 at 9:24
Well personally I favour the first option :P. You could make a new question for the unanswered portion. – RJFalconer Feb 20 '10 at 16:04
OpenOffice 3.2.1 does not find "\n" at all in a txt document (created with Vim and containing unix line endings (\n)). Yes, I have checked the "regular expressions" option. – blueyed Jan 11 '11 at 23:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.