Cut or copy lines without counting the lines - Vim Tips Wiki

Cut or copy lines without counting the lines - Vim Tips Wiki: "If you ever need to cut/copy/delete/paste lines without knowing the actual number of lines, here is what you should do.

1. In normal mode, go to the beginning of the section that you want to yank.
2. Type mk to mark this spot as k.
3. Go to the end of the section you want to yank using whatever movement commands you like.
4. Type: y'k (, , k) To yank from the mark to the current location.
5. You can paste those lines wherever you want with p

Similarly, d'k will cut/delte the lines from the current location to the mark.

- Sent using Google Toolbar"

Comments

Popular posts from this blog

How to use the Inbox Repair Tool to recover messages in Outlook 2000 that is installed with Internet Mail Only option

ReadyNAS default login and password

Repair corrupt Outlook PST files with two Microsoft utilities