How do I save a file in Vim?

How do I save a file in Vim?
Answer
Commands to save changes in vim
  1. Start vim by typing vim filename.
  2. To insert text press i.
  3. Now start editing text. Add new text or delete unwanted text.
  4. Press Esc key and type :w to save a file in vim.
  5. One can press Esc and type :wq to save changes to a file and exit from vim.
  6. Another option is to press :x.
 

Tìm kiếm

Back
Top