Forrest logo
back to the :q!<Enter> tool

helix:tldr:874f0

helix: Force-quit without saving.
$ :q!
try on your machine

The command ":q!" is used in a text editor, specifically in the Vi/Vim editor, to forcefully exit the editor without saving any changes made to the file being edited.

Here's a breakdown of the command:

  • ":" is the command mode indicator in Vi/Vim editor. It is used to start a command.
  • "q" specifies the command "quit," which means to exit the editor.
  • "!" is an option used with the "q" command to force the exit without saving any changes.
  • "" is the key press that confirms and executes the command.

So, when you enter ":q!" in Vi/Vim editor, it immediately quits the editor, discarding any unsaved changes you might have made to the file. It is a way of exiting abruptly, even if the file hasn't been saved.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the :q!<Enter> tool