Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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