我总是使用:wq
来保存文件。今天,我开始知道:x
可以用来做到这一点。但我没有在任何vi-tutorial或vi-quick-reference中注意到它。这两个命令有什么区别吗?
答案 0 :(得分:21)
来自
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.