Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .