VIM for Windows - 我要输入什么来保存并退出文件? [英] VIM for Windows - What do I type to save and exit from a file?

查看:181
本文介绍了VIM for Windows - 我要输入什么来保存并退出文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用WinXP我意外地输入了 git commit -a 而不是 git commit -am我的提交信息,现在我正在查看我的CMD提示符,其中填充了我提交消息的文件版本(请输入提交消息以供...)。我已将信息添加到顶部,但现在我无法弄清楚如何保存和离开。我尝试按 CTRL + W + Q ,但它除了添加 ^ 游标所在的位置。

Using WinXP I accidentally typed git commit -a instead of git commit -am "My commit message", and now I'm viewing my CMD prompt filled with the file version of my commit message ("Please enter the commit message for your..."). I've added my message to the top, but now I can't figure out how to save and leave. I tried to press CTRL + W + Q, but it doesn't do anything but add ^ where the cursor is.

我也先尝试 esc ,然后 CTRL + W + Q ,但它表示自上次更改后没有写入(添加!覆盖)

I also tried esc first, and then CTRL + W + Q, but it says No write since last change (add ! to override).

推荐答案

ESC 以确保您不在编辑模式,然后输入:

Press ESC to make sure you are out of the edition mode and then type:

:wq

这篇关于VIM for Windows - 我要输入什么来保存并退出文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆