This Question is Answered

2 "helpful" answers available (2 pts)
6 Replies Last post: Mar 12, 2010 3:47 PM by Andy Kriger  
Ville Walveranta Newbie 3 posts since
Feb 5, 2010
Currently Being Moderated

Feb 5, 2010 8:31 AM

Prompt to Save?

I'm evaluating IDEA9, and just run into an issue I wanted to clarify.  I had opened some random header file to try out IDEA's keyboard short-cuts.  After a few moments I had thoroughly messed up the file and then closed the tab.  Few moments later it dawned on me that IDEA had saved the file! Good thing it was running off of SVN so I did't lose anything.  Reading into documentation it became soon clear that this is how IDEA works ("IntelliJ IDEA saves changes automatically on exit.")  It's possible to disable this functionality, but then a changed file is closed quietly without prompting whether I would like to save the changes I just made.  Why is this?  In an old thread on these forums someone responded to a question "is it possible to get a save prompt everytime you close a modified file?" by saying: "No. Forget it. You don't need to save."

 

But I do need to save!  Very often I open a file, edit it, then use "Save as" to save it with a different name, and then close the original file, never saving it. Or I open a file, make tentative changes to it, and then decide not to use those changes after all, and just close the file to discard it. The automatic save-on-close makes either of these scenarios impossible, but disabling the auto-save isn't a solution either as equally frequently (or more frequently) I want to save a file I've made changes to. Perhaps this is just "the way IDEA IDE does things", but forcing developers to a particular workflow has never been successful even if there is a good reasoning behind a particular non-standard way of doing things.

 

So if this feature doesn't currently exist, would it be possible to have it added to IDEA in the next release? I would think it should be fairly easy to add since there are already the options to automatically save or to quietly discard an edited file.

 

Thanks for any insights on this!

Dmitry Jemerov JetBrains 11,708 posts since
Aug 19, 2002
Currently Being Moderated
Feb 5, 2010 1:06 PM in response to: Ville Walveranta
Re: Prompt to Save?

Hello Ville,

 

Well, after posting the questions, I noticed older threads

/message/5251578 and /message/244526 which pretty much answered the

question. I still think it would be good to offer that option to the

users... though perhaps (?) adding such feature would break something

else (like the local VCS) in the IDE.

 

Not having the option to save an individual file (and the prompt to

save a changed file when closing it) makes it impossible to make

pending/tentative changes to open files. It is often necessary to save

a file to the dev server to see whether it produced the desired

results (especially in the PHP context), but equally often I don't

yet want to save all the changes I've made to the currently open

files. I understand this is not possible with IDEA as it currently

stands?

 

No, this is not possible. There's a lot of features in IDEA that rely on

being able to save anything to disk at any time. For pending/tentative changes,

you can use either Undo, Local History or the "Revert" action in the VCS

integration (you do have your code stored under version control, don't you?).

 

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

 

 

 

Martin Fuhrer Expert 1,657 posts since
Oct 9, 2002
Currently Being Moderated
Feb 6, 2010 9:28 AM in response to: Ville Walveranta
Re: Prompt to Save?

That's the great thing about IDEA; with local history you have revert to

previous version only a 'click away' even in non-VCS projects. Give it a

try, you really can revert to any state from days before.

 

tc master Novice 176 posts since
Jun 22, 2003
Currently Being Moderated
Feb 7, 2010 12:47 AM in response to: Martin Fuhrer
Re: Prompt to Save?

This reminded my shock when I first tried IDEA, and now, to be honest, I hate the prompt saving dialogs.         

Andy Kriger Newbie 64 posts since
Dec 1, 2004
Currently Being Moderated
Mar 12, 2010 3:47 PM in response to: Ville Walveranta
Re: Prompt to Save?

Local History is also extremely powerful and not to be overlooked. Even if you don't want to revert all the way back to the source control version, it's almost always possible to get to an earlier edit of the code using the local history. I've been using IDEA for a long time and even though I still routinely Ctrl-S out of long-ingrained habit, I think IDEA is the gold standard for the way apps should handle file saving.

More Like This

  • Retrieving data ...