:write-quit! [path]
Aliases: :wq!, :x!
:wq!
:x!
Writes (saves) the buffer to disk, then closes the view, discarding unsaved changes if this would exit the editor. Identical to :write [path] followed by :quit!. See those commands for more info.
:write [path]
:quit!