vim save exiot code example
Example 1: save and close vim
// Save & exit(quit)
:wq
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(quit)
:wq
// Save a new file (if you have entered vim without first creating a file)
:w
// Save file and exit
:x