save in vim command code example
Example 1: how to insert in vim and save
vim filename #open file in vim
//To insert text press i and you can start editing
//Press Esc key and type :wq to save a file AND exit
//Press Esc key and type :w to save WITHOUT exiting
Example 2: save and close vim
// Save & exit(quit)
:wq