8

I wonder if there is a way to tell to the IDE to autosave any file if modified. I've searched the web but I haven't find anything. There was a module on NetBeans 7 but it is not available now on NB 8. Anyway it appears that the old plugin can be set to execute save all on a given interval. What I want is a feature to save when you modify something just like in Intellij IDEA.

Thanks

bogdan.rusu
  • 901
  • 4
  • 21
  • 41

3 Answers3

8

This plugin also saves when the file loses focus: Plugin

I would also prefer something like IntelliJ's Android Studio, but I don't think it exists for Netbeans.

Yster
  • 3,147
  • 5
  • 32
  • 48
  • I already have that module installed. It doesn't seem to work – bogdan.rusu Sep 02 '15 at 09:01
  • 1
    For me it seems to work on NB 8. But it seems that it only saves on losing focus. And it only worked after ticking the box in: Tools | Options | Micsellaneous | Save Automatically. – Yster Sep 02 '15 at 12:59
  • Yes but the min interval in at one minute, which is a large interval I would say. Too bad NB hasn't something like Inteijji's autosave. – bogdan.rusu Sep 02 '15 at 14:37
  • 2
    Works perfectly, you just have to change the default from 10 minutes to 1 minutes and active save on focus change. The 8.0 plugin also works with netbeans 8.1. – tak3shi Feb 19 '16 at 10:00
  • How can I change the default time from 10 minutes to 1 minutes ? @tak3shi – Lakshya Munjal May 06 '20 at 18:39
2

I downloaded the below netbeans plugin. It will automatically save after every 1 second once installed. it was built for Netbeans 8.1 and not tested for the version 8.2 but it worked for me.

Netbeans 8.2 AutoSave Download Link

Install in Netbeans via Tools > Plugins > Downloaded and click on add "Add plugins..." button

BoCyrill
  • 1,219
  • 16
  • 17
  • I installed the plugin on NB 8.2. I did a test with a modified, unsaved file, and killed NB process on Linux. File was restored. Don't understand why this feature is not implemented in core NB itself. Basic essential feature. – Paul Jan 27 '20 at 14:05
  • Note that it immediately overwrites the original file. It does not keep a "shadow" copy similar to MS Word, which is restored on restart, and which has to be manually saved, to complete the restore operation. However, the autosaved copies appear in the file history, which rapidly gets polluted with too many entries.. – Paul Jan 27 '20 at 16:54
2

In NetBeans 12.4 the module options can be changed from the section below and you don't have to download a plugin. Tools > Options > Editor > Autosave section.

(also it is in version 12.5. I didn't find it in version 12.0)