Quit VIM - how it works
Related Videos: Vim Basics in 8 Minutes (May 2024).
The well-known "Vi IMproved" editor alias VIM is already preinstalled as standard for Linux distributions. However, quite a few users do not know how to quit VIM, let alone use it.
Exit VIM
Latest videos
In normal mode, for example, plugins can be controlled or commands entered.
The insert mode enables text editing.
VIM includes two modes: the insert mode and the normal mode . The exit falls into the second category.
- Start Vim with the command of the same name vim on the Linux shell. If this command is entered together with a file name, the text file is opened when VIM is loaded or created if this file does not yet exist.
- Pressing the escape key takes you to normal mode - the text is not edited there. If you press the i key in normal mode, VIM switches to insert mode, where you can enter, delete or change text.
- In normal mode, press the colon key so that the input prompt appears within VIM. Here you can enter VIM commands.
- There are several options for exiting VIM:
- So the q key means to just close the editor.
- If changes have been made to the text that are also to be saved, press the q and w .
- To close VIM without saving, use the q and !, This effectively forces the editor to close
- To better understand VIM, there is an interactive tutorial that you can complete online at www.openvim.com.