`:write [path]` Aliases: `:w` Writes (saves) the buffer to disk. If [path] is supplied, that path is written to. If the buffer is a scratch buffer, meaning it is not already bound to a file path, [path] becomes required for this command to succeed.