If you have already provided a filename when opening the editor, changes will be saved directly to that file.
If you haven't provided a filename or want to save the changes to a new file, press Ctrl+Q to prompt for a filename.
Enter the desired filename and press Enter to save the changes.
Press Enter without entering a filename to cancel the save operation.
Quit the Editor:
After saving the changes, or if you decide not to save, press Ctrl+Q again to quit the text editor.
Note: If you press Ctrl+Q without saving changes, the editor will exit without saving. Ensure you save your changes before quitting if you want to keep them.