Dave's Brain

Browse - Computer Tips - How can I delete things In vim?

Date: 2015jun23
Keywords: vim, vi
OS: Linux

Q.  How can I delete things In vim?

A.  The commands in vim are pretty sensible.

x Deletes the current character dw Deletes the current word d$ Deletes from the cursor to the end-of-line dd Deletes the current line 4dd Delete 4 lines :.,$d Delete from here to eof :1,.d Delete from start-of-file to here . Repeat the last command (including these deletes) u Undo the previous command (including these deletes)

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.