vim delete selected code example
Example 1: vim select all and delete
Press "esc" button;
Type: ggdG
Example 2: vim select lines and delete
# Press v and you are in visual mode
# Select the lines
# Press x
Press "esc" button;
Type: ggdG
# Press v and you are in visual mode
# Select the lines
# Press x