So this post is a note to my future self, because I'm vaguely worried I might forget: When doing UI work, I strongly prefer as tight a save-compile-reload as humanly possible. For example, sometimes I'll operate directly on files in an exploded war on Tomcat. In IntelliJ land, for simple static file changes, I was getting annoyed by having to click "debug" (for a running server), manually clicking on the first option "Update Resources", clicking "OK", and THEN having to go over the browser. IntelliJ had extensive Keymapping abilities, but I couldn't figure out how to hotkey this. My coworker Vince came up with the following:
i have a solution for you go to Preferences->Keymap->Main menu->Run->Update Running JavaEE Application. Set the keymap to what ever key combination you want. Exit out, start debug mode and press the key combination that you specified. Once you do that, it will prompt you with four choices. Pick update resources and click the checkbox at the bottom asking if that is what you want to do everytime. Then everytime you are in Debug mode, press the key combo and it will update what ever is running. Also will do the same if you are in Run mode and not Debug modeWorked great! I selected cmd-1 as my easy to remember, not otherwise useful key combo, and now my life is better: cmd-s, cmd-1, cmd-tab (to browser), shift-cmd-r (reload). (or just shift/click-reload-button) Much faster than having to use the mouse, and my fingers got tuned to it pretty quickly.
BUT WAIT! One thing it's almost easy to forget, and odd to get used to, is this: IntelliJ is saving ALL THE TIME. You don't have hit cmd-S at all (though it doesn't hurt anything if you do.)
No comments:
Post a Comment