Stop panicking and wait with re-installing the OS and starting all from scratch – in this article I will show you how to exit a vim trap. You wanted to edit a file using vim editor but got stuck in it. Apart from that a basic vi editor guide is also appended so that new users get familiar with the editor.If you are reading this article then you are in trouble. In this article we covered different ways to save a file, to quit the editor, and commands that do both save and quit along with shortcut keys. Save changes to all the open multiple files Quit all open files without saving changes (force-quit) Step 3: Use any of the above commands ( wq, x, ZZ ) to save the file and quit the editor in the below screenshot we have used : wq command to save the file and quit the editorĪll the above-mentioned commands are mentioned below in a tabular format: ZZ (Shift + ZZ) – Save changes and exit.□ – Same as :wq used for save changes and quit.There are 3 ways to save a file and quit the vi/vim editor which are mentioned below: Step 3: Use any of the above commands ( q, q!, qa or ZQ) to quit the editor in the below screenshot we have used :q to quit the editor Step 2: Enter in command mode by pressing Esc if you are in insert mode Step 1: Open a file or create using the vi editor
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |