I know what the answer is going to be, but I feel I need to ask anyway:

Do you know of a way to disable the autosave in PhpStorm? It makes me very uncomfortable and honestly what the hell? They can't include this as an option in their myriad of options? They have over 9000 options but don't include that as one? I searched online. There are some "mitigating" settings you can change, but it doesn't disable the autosave. I have never heard this in an IDE or text editor ever. At least not as a default, unchangeable setting. Like I get that some people may like it, which is why it should be included as an option, but I think most people are going to find it weird and unintuitive.

Anyway, just wondering if you had any insight on it. Maybe a plugin you know about that disables it, etc.

EDIT: Why did they even bother including a save button in the toolbar? 😕

    Isn't that configurable here: [ATTACH]5193[/ATTACH] ?

    Note: I'm using a "nightly build" version while waiting for the boss to actually buy some licenses, so maybe it's a new feature?

    autosave.png

      Those are the same options I have, but they don't actually disable the autosave - only configure how it works. I found this "guide", but when I tried making a change to a file, then immediately exiting the application, they changes were there (I opened the file in Komodo and Windows updated the modified date/time), so they obviously don't work. I have enabled the setting to mark a tab if I made a change (I would think this would be default - what if you accidentally typed something?), but that doesn't really solve anything, and if you close the file and reopen it, it still has the asterisk, kind of defeating its purpose.

        You most certainly can, I'm using released 8.0.3 and using the search bar at the top, I typed in save and found the options nogdog pointed out. The search feature in settings is amazing and makes it easy to find what you're looking for without expanding all menus.
        [ATTACH]5195[/ATTACH]

        I'd also point out, that I don't know of anyone using PHPStorm that has changed this setting 😛

        save.png

          I didn't even know about it until I saw it here. Since everything I do is in Git, I guess if/when I saw any file changed during a "git status" that I didn't want changed, I just reverted it via Git without any thought as to why it may have been changed. 🙂

            So I've done some testing and this is what I have discovered:

            You can disable the "active" autosave, but when the application or project is closed, the changes are saved automatically. Makes me wonder what happens if the power goes out or if there's a system crash (or if the application crashes). Closing the file tab doesn't save the changes, and when you reopen the file, it will still have the asterisk. Pressing ctrl+s will manually save the file, removing the asterisk.

            I have all the checkboxes under "Synchronization" unchecked.

            There are no warnings when you try to close a tab, the project, or the application. You can set the "confirm application exit" option, but that is just in general - has nothing to do with modified files.

            I'm still going to use PhpStorm over Komodo, but I honestly don't like this behaviour, and it baffles me that this isn't an option that users can control.

            EDIT: It appears these changes do not apply to files that have file watchers assigned to them. I currently have a file watcher for my .less files and one for my .js files, and they are automatically saved and compiled as I type.

              Bonesnap wrote:

              Makes me wonder what happens if the power goes out or if there's a system crash (or if the application crashes). Closing the file tab doesn't save the changes, and when you reopen the file, it will still have the asterisk. Pressing ctrl+s will manually save the file, removing the asterisk.

              You might want to ask your coworker who's using Sublime Text, because if I recall it's behaviour, you're describing the same thing that it does (and, If I recall rightly, it's the conventional behaviour for Mac apps in general; relevant because ST is a descendant of one.)

                Basically what's happening, if PHPStorm keeps a changes history. If you right click a file in the project and choose show history under local history, you can see all the changes that have been made and revert any of them individually. So if the system crashes at most you would lose maybe a minute or two of changes.

                  On the topic of opening files: Have you discovered cmd-click / ctrl-click on usages of classes and functions? It will take you to the definition. E.g.

                  $foo = Foo::factoryBar();
                  

                  cmd-click / ctrl-click factoryBar would take you to the definition of Foo::factoryBar - it opens the file and scrolls factoryBar into view.

                    johanafm;11046881 wrote:

                    On the topic of opening files: Have you discovered cmd-click / ctrl-click on usages of classes and functions? It will take you to the definition. E.g.

                    $foo = Foo::factoryBar();
                    

                    cmd-click / ctrl-click factoryBar would take you to the definition of Foo::factoryBar - it opens the file and scrolls factoryBar into view.

                    You can also hit control b while your cursor is at a function/method/variable name.

                      So it seems if you're switching between file types, the file watcher will stop compiling as well until you actually save. I noticed it when I went from my .less files to my main .js file (I have file watchers on both). Maybe it's just a coincidence but when my went back to my .less file and my menu wasn't updating I was wondering why :p. Other file types (.php) still update "manually".

                      Weedpacket;11046861 wrote:

                      You might want to ask your coworker who's using Sublime Text, because if I recall it's behaviour, you're describing the same thing that it does (and, If I recall rightly, it's the conventional behaviour for Mac apps in general; relevant because ST is a descendant of one.)

                      He does have a Mac, but I am pretty sure he uses Coda on it, though he discovered there's a version of PhpStorm for Mac so he's going to look into that. He seemed off put by the autosave, so maybe the behaviour in Sublime Text 2 is different? He's been using Brackets lately, so maybe he just forgot.

                      johanafm;11046881 wrote:

                      On the topic of opening files: Have you discovered cmd-click / ctrl-click on usages of classes and functions? It will take you to the definition. E.g.

                      $foo = Foo::factoryBar();
                      

                      cmd-click / ctrl-click factoryBar would take you to the definition of Foo::factoryBar - it opens the file and scrolls factoryBar into view.

                      Komodo did this as well, though it was much slower and buggier.

                        Bonesnap;11046711 wrote:

                        But then they released version 8.5, and everything went to hell. I noticed code intelligence was very sluggish, slow, or simply didn't work. I would start typing, expecting some autocomplete for a variable or function and would get nothing. Or it would come up, but would take several seconds. Well obviously I could have just continued to type the function if I knew it was going to take 3 or 4 seconds for the list to appear. What's ironic is in the release notes for 8.5, ActiveState (the company that makes Komodo Edit) says they modified the code intelligence and autocomplete to be in its own process to improve performance. But the opposite happened! Native PHP functions and classes seemed to be okay, though.

                        Maybe you should call up the Komodo team and tell them to quite hiring developers away from NetBeans :evilgrin: :evilgrin: :evilgrin:

                        public function duck_and_run() {
                        
                           $this-height--;
                        
                           foreach ($range(1,1000) as $null) {
                              $this->distance++;
                           }
                           exit; //bye now!
                        }
                          5 months later

                          I have a PHP Storm question..
                          I've been trying it out and one thing I don't like is it marks variables and function names, which aren't real words as a "typo" - so that's everything.
                          What do you all do? Add each one as a dictionary entry ?
                          Seems odd that you can't set it to "ignore spelling on PHP variables" .

                            You most certainly can disable spell check. Go to settings -> editor -> inspections -> spelling, uncheck the things you don't want it to check (literals, code, comments)

                            However, I never have this problem, all my variables are words....

                              By default its spell-checker understands camelCase and snake_case, so if your variables are composed of actual words $suchAsThis, it will be fine (and you'll be encouraged to use meaningful and readable variable names 😉 ). As far as turning it off (e.g. have to deal with legacy code?), this looks like your best bet (I've not tried it): http://stackoverflow.com/questions/14983942/how-to-disable-spell-checking-for-all-my-projects . Looks like you can turn it on/off globally or by project.

                              PS: A halfway measure might be to change the indication of misspellings to something less noticeable, so you can ignore it when you don't care.

                                Ah ok.. thanks
                                I use snake case and the vars are based on real words but, for instance, I almost always add short prefixes on SQL columns to indicate what table they are in.
                                Seemed like a good idea way back when!

                                  cretaceous;11050527 wrote:

                                  Ah ok.. thanks
                                  I use snake case and the vars are based on real words but, for instance, I almost always add short prefixes on SQL columns to indicate what table they are in.
                                  Seemed like a good idea way back when!

                                  Maybe add those prefixes to the dictionary?

                                    PSA to anyone considering purchasing a PhpStorm licence:

                                    As on November 2, 2015, JetBrains (the company who makes PhpStorm) will no longer be offering perpetual licences and will be moving over to a subscription-based licencing scheme. Link to the announcement.

                                    A quick perusal of the comments shows that the reaction to this news has been overwhelmingly negative. Like, I don't remember seeing such a negative reaction to something like this since the release fiasco of Diablo III or the new SimCity. Most people are pissed. I can't say I blame them. I guess I am one of the "lucky" ones since I own a perpetual licence, but anyone who wants to start using the software (legally) after November 2, 2015 will be locked in to their subscription. If you are unable to connect to the Internet after 30 days to verify your subscription the application will shut down.

                                    What are your guys' thoughts on this? I assume those here who already use it have a perpetual licence so you're okay like me because we can always fall back to it.

                                      A negative reaction is only natural: these developer tools are more product than service, therefore people expect to pay for a product that they can use until the changing software ecosystem makes the tool unusable (whether because of complementary software upgrades, or simply because newer tools are too superior to ignore). The services provided are the product upgrades and customer support, hence a licensing model that charges for access to upgrades and premium support sounds more reasonable than monthly subscription with no product at all if one does not renew subscription.