0

I'm trying to saves the file automatically in Nano but didn't succeed. what is the option to do this?

4
  • No such argument mentioned in the man page. Aug 11, 2022 at 11:24
  • then have similar argument in VIM???? Aug 11, 2022 at 11:26
  • 1
    I don't think there is, but I don't use it or have it installed. Unix console text editors are used to edit system configuration files and automatic saving may lead to dire consequences or even a dead system altogether. You could use LibreOffice instead. Aug 11, 2022 at 11:28
  • Use GNU Emacs: No data loss in 32 years!
    – U. Windl
    Aug 19, 2022 at 0:55

1 Answer 1

0

According to the nano manual for version 6.2

-t, --saveonexit
              Save  a changed buffer without prompting (when exiting with ^X).
              (The old form of the long option, --tempfile, is deprecated.)

You can also add set tempfile to ~/.nanorc.

But, like the comment by @Artem mentions, be careful when editing config files with auto save.

https://askubuntu.com/questions/922613/how-to-exit-nano-and-save-to-current-file-automatically

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .