you probably don't have vim, as this is an extension of Vi (although essentially it is the same thing). try this to get vim (if you're using debian os):
sudo apt-get install vim
I have a great cheat sheet for vi , but it will take practice to learn how to use it effectively.
Here are some of my most used commands for vi/vim:
i - enter input mode
esc - escape input mode
del - delete text
:q - quit
:wq - write and quit
:q! - quit without saving
dd - deletes a whole line
shift+a - goes to the end of a line and enter input mode
As for the ex command, I'm not sure what that does without being able to test it.