vim basic save file code example
Example 1: vim save and quit
// Save & exit
:wp
Example 2: vim save file
// Save a new file (if you have entered vim without first creating a file)
:w
// Save file and exit
:x
// Save & exit
:wp
// Save a new file (if you have entered vim without first creating a file)
:w
// Save file and exit
:x