Compilation on save

Answered

Automatic compilation feature looks inconvenient. It either tries to build my stuff almost immediately (and causes auto saving as a side effect), or is not working automatically at all. I feel that auto saving is a scary thing to do (several Ctrl-Z, type something, so cannot Ctry-Y, and than auto-save completes the job). 

Is it possible to somehow emulate what Eclipse or Visual Studio do: no auto save, Ctrl-S (or some other shortcut) saves single file instead of all files, and automatic compilation is triggered by the save event, not by typing?

0
9 comments

Assign Ctrl+S to Build | Make, however it will save all the files before Make anyway. There is no way to disable it.

0
Avatar
Permanently deleted user

Thank you, it feels much better now.

0

Hi, I´m new to intelliJ :)
When I assign Ctrl+S to Rebuild (Default assign of Rebuild is STRG+Shift+F9) nothing happens. 

Is it somehow possible in a Java Projekt to rebuild on save?
 

0

Does the Build | Rebuild menu work for you? Can you share a sample project where it doesn't work? Any errors in the logs?

0

Hi Serge, I shared my test project on github https://github.com/Mattes1000/Test.git . I hope I did it right. 
What do you mean by “Build | Rebuild menu”? Where do I find it?

 

0

Your GitHub link doesn't work.

0

:) Sorry. Now the repo is public. 
The “Rebuild Project” builds - as the name says - the whole project.  But yes: This refreshes my classes. 
I want to compile and refresh a single file as the shortcut “STRG+Shift+F9” does
 

0

Recompile action works fine after redefining the shortcut:

I'm pressing Ctrl+S at the end, and the Recompile action is invoked for the current file.

0

That did the trick! Thank you very much for this newbie support.

0

Please sign in to leave a comment.