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.

I'm copying a lot of source code into LibreOffice Writer. It is inserted with new paragraph line ending instead of newline line ending. That consumes a lot of vertical space and make document look ugly.

I'm looking for quickest way to make lines ended with newline characters.

share|improve this question
add comment

2 Answers

When I try to do this kind of thing I turn to the Alternative dialog Find & Replace extension. I don't know if it is compatible with LibreOffice 3.6x, but it works with previous versions. With regular expressions activated I replace \p with \n in whatever area of the document that I have selected.

share|improve this answer
add comment

Is it not the Default style that you are using that has spacing before each paragraph. I generally set-up a Code style (with no additional line spacing) and apply that to all my code examples.

Put your cursor into some of the code, and then press F11 to display the Styles and Formatting box. This will highlight the style that you are using, right click the style and select Modify to adjust the line spacing.

share|improve this answer
add comment

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.