DevOps Helper

How to exit from Vim

Easy:

To exit from vim, you can use the following commands:

  1. Press the Esc key to ensure you are in command mode.
  2. Type :q to quit vim if there are no unsaved changes.
  3. If you have made changes and want to discard them, type :q! to force quit without saving.
  4. To save your changes and exit, type :wq or :x.

That’s it! You now know how to exit from vim.