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

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

问题描述

使用 Windows XP 我不小心输入了 git commit -a 而不是 git commit -am "My commit message",现在我正在查看已填充的 CMD 提示使用我的提交消息的文件版本(请为您的...输入提交消息").我已将我的消息添加到顶部,但现在我不知道如何保存和离开.我试着按 Ctrl + W + Q,但它没有做任何事情,但添加 ^ where光标是.

Using Windows XP 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 edit mode and then type:

:wq

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

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