End a VIM Session?

2008-07-22 6:11 am
I'm rather new to UNIX, as you've probably already found out, and I have forgotten how to save a vim thing. after i type

vim /home/don/Desktop

and enter my text, how do i save it and exit vim?

回答 (2)

2008-07-22 6:29 am
✔ 最佳答案
Type in ":wq" to write file and quit. If you just want to quit, without saving the file you're editing, use ":q".

There are a whole bunch of tutorials for vim available on the internet, but I'd suggest you take a look of the internal help by typing in ":help" first.
2008-07-22 1:25 pm
<esc>:wq

if that doesn't work because of write permissions, trying adding a ! at the end of the w, then do the :q separately. And no, those aren't emoticons. They are actually the keys Escape,colon,w,q.
參考: Personal experience


收錄日期: 2021-05-01 01:01:19
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080721221113AARYUoK

檢視 Wayback Machine 備份