13

我总是:wq用来保存文件。今天,我才知道:x可以用它来做到这一点。但我没有在任何 vi 教程或 vi 快速参考中注意到它。这两个命令有什么区别吗?

4

1 回答 1

22

help :x

    *:x* *:xit*
:[range]x[it][!] [++opt] [file]
            Like ":wq", but write only when changes have been
            made.
            When 'hidden' is set and there are more windows, the
            current buffer becomes hidden, after writing the file.
于 2012-12-12T16:26:18.030 回答