I have tried to follow the following:
How to delete selected text in VI editor
but
5dd
gives
E492: Not a
I find this easier
https://superuser.com/questions/170795/how-can-i-select-and-delete-lines-of-text-in-vi