when opening multiple files in vscode, only the first is actually loaded in memory

老子叫甜甜 提交于 2021-02-11 15:02:35

问题


For my job i'm frequently opening lists of files from the terminal.

When i do this with vscode, they are opened and all the tabs are there. But only the files i have clicked though and looked at are loaded into memory.

If i were to do a find and replace it would only bring up results from the files i have looked at. It also doesnt tell me how many files are open exactly which would be nice.

These all seem like things other editors do by default.

I was wondering what i have to do to enable this or if any extensions exist to handle it.


回答1:


It's being worked on to be less 'hacky'.

https://github.com/microsoft/vscode/issues/15178

There is this extension that could maybe work for you:

https://marketplace.visualstudio.com/items?itemName=eamodio.restore-editors

He used a 'hack' to get it to work: https://github.com/microsoft/vscode/issues/15178#issuecomment-283072868

It says he used 'workbench.action.nextEditor' to get it to work but I don't see that, in his code, anymore so he must be using something different now. https://github.com/eamodio/vscode-restore-editors



来源:https://stackoverflow.com/questions/64611182/when-opening-multiple-files-in-vscode-only-the-first-is-actually-loaded-in-memo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!