How to clear selection in OS X Terminal?
You need to learn the keyboard commands for the editor you are using; in this case, vim.  

To delete, press Esc for "Command Mode" then....


x -  for a character
dw  - for the current word
dd  - for the current line
5dd -  for five lines


Terminal isn't a GUI environment so mouse interaction is minimal.  See Vim Help Files for full documentation on how to use Vim.

(I personally prefer nano as it's much more user friendly and included with macOS)