I know I've probably looked over this a million times in all the VI documents I've read, but I can't seem to find the delete from cursor to end of line command.
|
|
The command |
|||||||||||
|
|
One of the nice things about vi is its logical command structure. |
|||
|
|
You probably want to use D. Move the cursor to the first character you want to delete, then hit shift-D. Everything gone. Actually, it's in the default cut buffer, so you can P or p paste it back in. I use Dp (delete to end of line, then put it back), move to the end of some other line, then p again to paste the same text in at the end of this other line. Works wonders in config files, where you need to put some complicated URL in two or more places. |
|||
|
|
