[英]why :w filename is not working to write file in vim
I was watching a tutorial in which instructor using vim for ruby on rials development.我正在观看一个教程,其中讲师使用 vim 进行 ruby 开发。 He writes code on blank screen and then uses command :w hello.rb the whole code behaves like ruby code... when i try to use this command it gives an error message.
他在空白屏幕上编写代码,然后使用命令:w hello.rb整个代码的行为就像 ruby 代码......当我尝试使用此命令时,它给出了一条错误消息。 I searched a lot on stackoverflow.com There are some similar questions but no one works... http://vim.wikia.com/wiki/Saving_a_file and Vim Can't Save File (E212) and one solutions is :w!!
我在 stackoverflow.com 上搜索了很多有一些类似的问题,但没有一个有效... http://vim.wikia.com/wiki/Saving_a_file和Vim 无法保存文件(E212) ,一种解决方案是:w! ! but i want to save file as :w filename eg :w hello.rb
但我想将文件另存为:w 文件名,例如:w hello.rb
Try using the following (after pressing escape) :wq!尝试使用以下命令(按 Esc 键后):wq! Should work.
应该管用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.