• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Exit Vim Text Editor

Written by Rahul, Updated on June 13, 2017

VIM is an enhanced version of VI text editor. It is highly configurable text editor to edit files very efficiently. Many of Linux beginners faces issue with exit form vi/vim editor. This tutorial will help you to exit Vim text editor in Linux command line.

How to Exit Vim?

As we have already seen in advanced Vim tips, there are multiple ways to quit Vim. Let me list them one by one along with the procedure.

You have several ways to exit from Vim text editor. But you need to choose the right command to exit from Vim editor based on your decision. Remember that exit command always run from Vim command mode. So you need to press ESC to go to command mode. Now type a colon : to before writing exit command.

  • ESC + :q – Simple exit from a file, only if no changes made to file.
  • ESC + :wq – Write changes and quite from Vim editor.
  • ESC + :q! – Quit Vim editor without saving any changes (discard all changes made after edit file or last saved).

exit vim

Using Keyboard Shortcuts

You can also use keyboard shortcuts to exit from vim editor. No need to type any thing. Press ESC to make sure you are in command mode.

  • Shift + z + z – save changes and exit
  • Shift + z + q – exit without saving changes

Reference:
http://vimdoc.sourceforge.net/

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy