Keeping files in cache VSCode/Prevent erase after closing - visual-studio-code

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

Related

VS Code shows multiple copies of the same file when browsing

I keep having this problem that VS Code is showing me multiple copies of the same file in my recently opened section. And I don't know how to get rid of this again 🙃
I've tried enabling workbench.editor.revealIfOpen to no effect.
Any inputs on how to only show one copy of the same file in recently opened?
Turns out this was because the extra copies where opened with a wrong path, it had ./ as a prefix. And vscode treats these as unique copies. It's been fixed for the ReScript extension in this pull request.

Prevent VS Code from opening all files in a folder recursively

I am currently using VS Code on a folder mounted through an SSHFS. The folder has subfolders with many jpg and other image files.
Logging all the files VS Code tries to open reveals it recursively touches all the files (doesn't read the content, just STATs them). This takes very, very long over an SSHfs mount and I can not cancel it without killing the editor (it won't even respond to regular closing).
During this, no files or directories can be opened (inside VSCode) and will show a loading spinner until VS Code has finally had it's way and checked all the files.
This behaviour only recently emerged, I can't pinpoint if any version beyond the current stable version has this behaviour.
I am thinking it might be the new searching engine, but I can't find out which part of the editor is doing it.
It looks like they just posted a fix for your situation:
Slow startup opening a large workspace over the network
you will need vscode v1.32.3

VSCode slow to open and highlight large log files

VSCode slow to open and highlight large log files
I use VSCode to open large log files with the log highlighter syntax. These log files are very large, often a couple hundred megabytes. I switched from Notepad++ to VSCode for all the features. Notepad++ usually opened the files okay but lacked the highlighting benefits.
The new VSCode updates asked me to increase memory size which I quadrupled.
However some logs either take a while to highlight or never do at all.
Is there anyway to either speed this up or get this to work a bit better? Should I open a github issue?
I would really like to use VSCode for these logs but it is annoying...
Resources on PC are not an issue.

How can I remove deleted files from emacs-projectile's cache if `projectile-invalidate-cache` doesn't do the trick?

Pretty much what the title says. For whatever reason projectile-invalidate-cache does not remove dead files from projectile's cache, or at least not from the results it presents me. I am using Spacemacs, an extension of Emacs, but I believe this issue is specific to projectile.
Restarting the editor does not fix the issue.
One thing to try would be to make sure you are running projectile-invalidate-cache from the project you want to clear out files for (i.e., from a buffer that is visiting a file in that project. From the docs for projectile-invalidate-cache:
Remove the current project's files from `projectile-projects-cache'.
Note it is supposed to work only for the "current project".
However, I have also not had much luck with this command (potentially this is me not using the command correctly). What I often end up doing is deleting the actual cache file (in my case this is ~/.emacs.d/projectile.cache. I have not noticed any negative effects of this, and your cache will be rebuilt without the deleted files next time you use projectile.
If your project is a git project, try to commit your change. It works for me.
Actually the correct path of projectile.cache file to be removed is: ~/.emacs.d/.cache/projectile.cache
I installed through MELPA, and deleting ~/.emacs.d/projectile-bookmarks.eld did the trick for me.

How to prevent NetBeans from remembering open files?

When I start NetBeans, I don't want it to automatically open the files that were open when I last closed it.
The only way I found to do that is to delete the following files:
del /q "%APPDATA%\Netbeans\7.2.1\config\Windows2Local\Components\MultiView-java*"
Is there a better way, e.g. an option that prevents NetBeans from saving the state of the open files on exit?
I know the question is very old but the issue is still there :) and the solution is the following:
Set/Open the desired starting files, project and then go to menu Window > Reset Windows.
It will remember whatever you had. So if you close all documents and call window reset, you will have no default opened files, which might be great for some of us.