Take the 2-minute tour ×

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

2 Answers 2

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

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

Your Answer


