How To Exit (quit) Linux Vi Editor With Or Without Saving Changes Step ...
Có thể bạn quan tâm
Incredibly simple; if you know how….
First how to launch vim
From the command prompt:
change to path where file is located with “cd”
vi filename
This will edit filename starting at line 1.
=========================
To exit without saving changes made:
- Press <Escape>. (You must be in insert or append mode if not, just start typing on a blank line to enter that mode)
- Press : <colon>. The cursor should reappear at the lower left corner of the screen beside a colon prompt. The colon indicates that what follows is a Vim command.
- Enter the following: q!
- Then press <Enter>. This will quit the editor, and abandon all changes you have made; all changes to the document will be lost.
To exit with saving changes made:
- Press <Escape>. (You must be in insert or append mode if not, just start typing on a blank line to enter that mode)
- Press : <colon>. The cursor should reappear at the lower left corner of the screen beside a colon prompt. The colon indicates that what follows is a Vim command
- Enter the following: wq Type “wq” , the “w” indicates that the file should be written, or saved which will overwrite existing file and the “q” indicates that vim should quit, or exit
- Then press <Enter>. This will quit the editor, and write all changes you have made; all changes to the document will be saved.
After exiting you can display the contents of the file with
cat filename
Từ khóa » Vi In Linux Save
-
An Introduction To The Vi Editor | Enable Sysadmin - Red Hat
-
How To: Vi / Vim Save And Quit The Editor Command - NixCraft
-
How To Save A File In Vi / Vim Text Editor - NixCraft
-
How To Save A File In Vi / Vim Editor & Quit - PhoenixNAP
-
How To Save A File In Vim / Vi And Quit The Editor - Linuxize
-
Using Vi? Here's How To Open A File Then Save And Quit - MakeUseOf
-
How To Save A File In Vi / Vim Editor In Linux - Tecmint
-
Saving Changes And Quitting Vi
-
How To Save & Quit In VIM Or VI | OSXDaily
-
Saving Files And Quitting Vi
-
How To Save A File In Vim/Vi? - LinuxTect
-
VI Editor With Commands In Linux/Unix Tutorial - Guru99
-
How To Save A File In Vi / Vim And Quit Editor - TecAdmin
-
How To Save A File In Linux After Using The Vi Command