The key important method is to know the only some shutcut key!
enter vi;
if you want to enter the "Edit" mode ,please type 'a', and you will enter the "edit " mode.
"Esc" key to exit the "Edit" mode.
In "Command" mode:
":q" key to exit vi
":wq <your filename>" : save and exit vi