q VIM Command
How to use q Command in Linux VIM editor?
q stands for quit
This Command is used to exit from the vim editor. If any changes are done in the file, then the editor prompts option to save the changes or not.
- Open the file test.txt using the command
$ vim test.txt
- To make the editor into insert mode
- Enter the test 'Hscripts'
- To come out of insert mode
- To quit the file
- This will prompt the command like follows
- To quit without saving
! is used in command to force any operation.
so q! will force the editor to exit or quit without saving the changes.