Free Hosting Online for WorkStations

< Previous | Contents | Next >

Joining Lines

vi is rather strict about its idea of a line. Normally, it is not possible to move the cursor to the end of a line and delete the end-of-line character to join one line with the one be- low it. Because of this, vi provides a specific command, J (not to be confused with j, which is for cursor movement) to join lines together.

If we place the cursor on line 3 and type the J command, here's what happens:


The quick brown fox jumped over the lazy dog. It was cool. Line 2

Line 3 Line 4

Line 5

The quick brown fox jumped over the lazy dog. It was cool. Line 2

Line 3 Line 4

Line 5


Top OS Cloud Computing at OnWorks: