Edit Page
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 15: | Line 15: | ||
==Cut and paste== |
==Cut and paste== |
||
Cut the line that you want to move by typing <code>dd</code>, or visually select some lines (press <code>V</code> then move the cursor) and type <code>d</code> to cut the selected block. |
Cut the line that you want to move by typing <code>dd</code>, or visually select some lines (press <code>V</code> then move the cursor) and type <code>d</code> to cut the selected block. |
||
− | |||
− | Then move the cursor, and paste the text at the new position (press <code>p</code> to paste after the line with the cursor, or <code>P</code> to paste before). |
||
You can cut several lines, or blocks of text, by appending to a register using an uppercase letter, for example: |
You can cut several lines, or blocks of text, by appending to a register using an uppercase letter, for example: |
||
+ | * |
||
− | *Move to the first line you wish to move; type <code>"add</code> to delete it to register <code>a</code>. |
||
− | *Move to another line; type <code>"Add</code> to delete it and ''append'' to the same register. |
||
− | *Move to another line; type <code>"Add</code> to delete it and ''append'' to the same register. |
||
− | **or type "." for the same effect |
||
− | *Select a range of lines vith V; type <code>"Ad</code> to delete the entire range and append it to the same register. |
||
− | *Continue in this fashion. |
||
*Move to the wanted destination. |
*Move to the wanted destination. |
||
*Press <code>"ap</code> to paste after the line with the cursor, or <code>"aP</code> to paste before. |
*Press <code>"ap</code> to paste after the line with the cursor, or <code>"aP</code> to paste before. |