Delete line in vi editor | vim delete Line (Mac,Unix,Linux,Ubuntu,Centos,Fedora)
Pressing dd
will remove that line (actually it will cut it). So you can paste it via p
.
Make sure you are now in the “Normal” mode, and then press dd
. The command ndd
will delete n lines from the line which the cursor is on.