What command is used with vi editor to save file and remain in the editing mode? A. x B. q! C. :w D. :q E. None of the above

x
q!
:w
:q E. None of the above

The correct answer is: D. :q

The :q command is used to quit the vi editor. If you have made changes to the file, you will be prompted to save them. If you type :q!, you will quit the editor without saving your changes.

The x command is used to delete the current line.

The q command is used to quit the vi editor. If you have made changes to the file, you will be prompted to save them. If you type q!, you will quit the editor without saving your changes.

The w command is used to write the current buffer to the file. If you have made changes to the file, you will be prompted to save them. If you type :w!, you will overwrite the file with the current buffer, without prompting you to save your changes.

The :q command is the most common way to quit the vi editor. If you have made changes to the file, you will be prompted to save them. If you type :q!, you will quit the editor without saving your changes.