what is the command to delete and cut the current line in vi

2 days ago 6
Nature

To delete (and cut) the current line in vi or vim, use the following command in normal mode:

dd

This command deletes the entire current line and places it in the unnamed register, so you can paste it elsewhere using the p command

. This is the standard way to "cut" a line in vi/vim, as deleting with dd both removes the line and makes it available for pasting.