Remove empty lines/spaces

Discussion in 'HOWTO-Related Questions' started by caspert_ghost, May 17, 2007.

  1. caspert_ghost

    caspert_ghost New Member

    Hello and thank you for your assistance.

    I am very new to ubuntu and I have been playing around with it these past few days.

    whenever I vi (edit) an item I sometimes make a mistake, when I clear the contents of that line I end up with a blank or empty line.
    Could you please tell me the code (command) to remove these empty lines.

    Ubuntu 7.04 Server edition

    Thank you
  2. caspert_ghost

    caspert_ghost New Member

    I have (after pressing various buttons to test) have found a way to remove the empty lines created by accident or by removing text...

    I hit +/= key twice and hit enter.. for me this works.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Or you put the cursor in the empy line and enter:


    to remove the complete line.

Share This Page