vi Join two lines and moreIn command mode, two lines can be joined, switched and repeated. J The J command can be used to join two lines. Example: ![]() Look at the above snapshot, we need to join first two lines of the above script. ![]() Look at the above snapshot, after pressing J, both the lines are joined. yyp The yyp command repeat the current line. Example: ![]() Look at the above snapshot, our current line is the second line. ![]() Look at the above snapshot, after pressing yyp command, current line is repeated. ddp The command ddp swaps two lines (current line and line below the current line). Example: ![]() Look at the above snapshot, last two lines are swapped from their positions.
Next TopicLinux vi Words
|