Kill VSCode explorer file loading - visual-studio-code

I'm using VSCode to develop on a remote server and my runs tend to generate large, compressed files which are not human readable. Sometimes I inadvertently click on one of these files in the explorer and VSCode attempts to load/open it. Whenever this happens, it just gets stuck on loading and that VSCode window is essentially unusable. I've only ever let it sit for a handful of minutes, but it never seems to finish loading.
So in each of these cases, I have to close the window, open a new one, and reconnect. Also any unsaved changes I have to c+p to my local machine and then back. Is there a way to just kill the loading/opening sequence?

Related

Keeping files in cache VSCode/Prevent erase after closing

I recently moved to VSCode from Notepad++, and I just found an annoying difference.
When I had for example n files opened in Notepad++ and I closed it(also if restarting computer), when re-opening it I used to find those files again, also if they were deleted from folder or edited.
In VSCode, just some files are keeping opened(it depends if you have got them locally or download once and then delete or refresh them), and that's an annoying thing for me.
I guess this function is related to cache system, so I am wondering: Is there any method to make the VSCode cache work like Notepad++'s does in VSCode? Are there any extensions to do it?
I mean: to keep files always in cache, except when I close them.
Thank you in advance

Sync vscode instances

I'm setting up a new machine and want to have as much synced between my two machines as possible. I use vscode as my main editor and would like, if possible, to have the two instances synced. I'm wanting to copy some settings folder to my iCloud drive, and then symlink it back to it's location on my local drives.
If I did this, will open files sync in real time, or only on startup? Will this likely lead to anything being corrupted? Is this even possible? Finally, what folder must I sync?
I'm doing exactly this nowadays (after using Settings Sync for a while) – syncing settings via my iCloud folder.
The content of ~/Library/Application Support/Code/User is what you are looking for.
I linked keybindings.json and settings.json and they both work fine without hickups so far. You might want to sync the folder snippets too.
workspaceStorage makes no sense to sync because they are specific to the workspaces you open on a single machine.
It works basically "out of the box". Even if a new setting gets not picked up instantly by a running VSCode instance if it syncs in the background while open, you can always cmd+shift+p Reload Window or open and close the settings (I almost never have to do this).

Eclipse: How to backup and restore session (windows, views)?

Occasionally, my fingers are faster then my brain and accidentally close views or windows of my development environment (which is Eclipse Kepler). I usually have two windows of Eclipse running side by side with individual views configured in both of them. Unfortunately, as soon as I (unintentionally) close a view/window, I have to set it up again. E.g. the build files in my Ant view get lost, I have to reopen files and so on...
Generally speaking, are there any plug-ins or options you can recommend that can help me backup and restore sessions? I'm aware of the "Save perspective" feature, but it barely meets my needs.
To be more precise:
Is there any feature to make Eclipse request my confirmation, before a (top-level Eclipse) window is closed? - I rarely do uncontrolled clicks twice :-)
Is there any plugin to save and restore my current views (incl. build files in Ant view)?
Is there any plugin to save a set of open files I'm currently working on? Would be neat, if I could open several files on a single click and get working right away. I'm thinking of a session management, where I can switch between several sets of open files.
Just in case none of the above is available and I messed up again, are there any files I can copy from one workspace to another to restore my Eclipse setup (windows/views)?
Any hints are welcome.

How do I save state in Aptana/Eclipse?

I am using Aptana (based on Eclipse) as an IDE for ColdFusion development. My computer occasionally crashes or shuts down unexpectedly, and when restarting Aptana, my state (which files are open, etc) reverts to the last time that I properly closed Aptana. This is slightly annoying, as I have to close all the open files (that I usually haven't used in a while, as I generally leave Aptana perpetually open), and find and open all the files that I was working on when the computer shut down. Is there any way to "save" my current setup (other than shutting down and reopening Aptana)?
It seems that there's no way to do this from within Eclipse/Aptana, but there is a plugin that's been developed to allow you to save the UI state. (I assume this would work for Aptana as well.)

Eclipse pydev: automatically save file when running program

It used to be that when I made changes to my .py file in Eclipse, then the changes would be automatically saved when I then ran the program in debug mode. I liked this since it meant that what it was debugging was the same as what I was looking at. Now it no longer does that, which means that's it's actually running an old version, unless I manually save the file first. The first time I ran the program, Eclipse asked me whether I always wanted any changes to be saved when the program was run, and I answered yes. I don't know why it doesn't do it anymore or how to get it back.
This seems to have happened after I started using Mercurial TortoiseHg with BitBucket. As part of that, I did move some files around, but everything is back and named the same as before.
Of course, I can just do change, save, run, but I'd rather not have to remember the extra save step.
Edit: Actually it's a bigger problem. It also shifts my breakpoints. In regular edit mode, I 1) set a break point and Save. 2) Add a new line above the breakpoint. Everything looks fine. 3) Save. Now the first breakpoint shifts position.
From your description, it seems that you're always opening the file as an external file and not a file within your workspace (the fact that breakpoints don't get updated is the major clue here).
You can check if this is what happening from the title that's shown in Eclipse (if it's a full filesystem path and not relative path considering your workspace location, this is what's probably happening).
How are you opening the file you're running? Are you opening it from the PyDev package explorer or dragging from the filesystem? (also, it'd be interesting knowing which eclipse/pydev/tortoise versions are you using)
Look at your Preferences -> Run/Debug -> Launching, you probably have "Never" set for Save Required Dirty Editors before launching.