MATLAB hangs when saving workspace - freeze

I'm using MATLAB R2012a with a dual-screen setup, so I have the command window on one screen and the M-file editor on the other. Sometimes when I make changes to my source code, I'll accidentally press Ctrl+S while the command window is in focus (instead of the editor). This loads a file chooser dialog for saving a MAT file of the workspace. However, regardless of whether I press "Cancel" or "OK", MATLAB hangs indefinitely. Is there something I can do so that saving the workspace doesn't fail?
I don't really care about being able to save the workspace, I just need it to work so that MATLAB doesn't hang whenever I accidentally try to.

As a temporary fix, you can un-define the Ctrl+S shortcut to save the workspace from the settings.
Go to File > Preferences > Keyboard > shortcuts:

Related

How to disable keyboard in a PyCharm project window?

I want to use search, undo, delete etc. using keyboard in my main editor window and NEVER on my project window.
But once I click file in the project window, I must now do second click into the editor, otherwise my keyboard will start wreaking havoc in the filesystem.
Please tell me there is an intelligent way to disable this!
Could not find it myself, mostly because I don't know how to even name this behaviour.

How do you configure IntelliJ IDEA to place the cursor in the editor window after hitting enter on a file in the project window?

I'm big on not using the mouse, especially while writing code. I've noticed in IntelliJ IDEA 2016.1 that when I'm navigating in the project window, hitting Enter while a particular file is selected opens the file in an editor, but it doesn't place the cursor in the editor. Interestingly, if I double-click on the file in the project window, the cursor is placed in the editor.
How do I configure IntelliJ to place the cursor in the editor after opening the file via Enter from the project window?
To the best of my knowledge, I do not believe there is a way to configure what you are looking for. A search for focus in the settings didn't turn up anything.
That said, hitting Esc when in the project view will return you to the editor. So you would need to do Enter, Esc. If having to type two keys in a row bothers you, you could always record a macro (Edit > Macros) to do that key sequence and map it to a shortcut.

IntelliJ IDEA reload file from disk on type

I have used Emacs a lot, and in Emacs when you try to edit a file which has been modified on disk, it disallows it, prompts that the file has changed, and asks you what you want to do about it.
In IntelliJ, if a file has changed on disk, I can type forever. This just happened to me: I wrote a 20 line function, and tried to save. Then IntelliJ prompted that the file had changed. I had the option of overriding my changes with the data on disk, or to corrupt the whole file by keeping the current data. I wanted to just copy my function and reload, but I couldn't even do that because the popup had the focus. I there isn't even a button to cancel the save. I pressed Escape and prayed that my change would be overwritten. What a nightmare...
Is there any way to make IntelliJ prompt on the first character typed? I really don't want to synchronize the whole project every time I start to edit a file a switch git branch.
Preferences > Appearance & Behavior > System Settings
Under the heading 'Synchronization', enable the property 'Synchronize files on frame or editor tab activation'.

IntelliJ - not asking if I want to save a file

I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation

How to reload unreal development kit after script change

i am currently learning unreal scripting. i am creating them on visual studio then compile them in it. I have created a level with the actor i have created.
The problem i have is every time i make changes to the script I am closing the UDK and reopen the level to see the changes.
Is there a way of saying to UDK to reload?
If you make changes to the script, you need to close any instances of UDK.exe, whether game or editor.
Here is a workflow to speed up the whole process by using .bat files to run the game or editor.
Create a text file and rename it to run_game.bat. Inside the file put the following text, adjusting the path to match your project settings:
C:\UDK\Kel\Binaries\Win32\udk.exe Level01
Note that Level01 is the name of your level / map file. This .bat file will run your game within that level.
Next, create another .bat file called run_editor.bat and put this text inside:
C:\UDK\Kel\Binaries\Win32\udk.exe editor Level01
By adding the editor parameter, you're asking to run the editor directly with the desired level.
Copy the two .bat files in C:\Users[Your username] for fast access.
Open the command line by pressing Windows + R, then typing cmd and hitting Enter. Type either run_game or run_editor and hit Enter.
If you have uncompiled code, you'll be asked whether to compile it, so say yes. You will also see any errors or warnings that showed up during compile, which is useful. If everything went well after the compile, press the Up key or type in the name of the .bat you are trying to run, and hit Enter.
Using the above method is also faster because it doesn't require you to compile the scripts in Visual Studio.
Unfortunately, no. Changes to UnrealScript require recompiling the .u file, and the game/editor has to be closed so the file can be deleted and recreated.
I'm not sure from your question if you're saying you're reopening the UDK editor every time you want to see the change, or if you're just reopening the game. If you just want to modify the script, compile, and see the result (without modifying the level), you don't have to reopen the editor. You can just run UDK.exe, press the '~' key to bring up the console, and type open yourlevelname. Or you can create a shortcut that runs UDK.exe yourlevelname to start the game on that level. Of course if you want to spawn in and run around, you'll need to put a PlayerStart in your level.