在vscode中打开多个文件时,实际上只有第一个文件加载到内存中 [英] when opening multiple files in vscode, only the first is actually loaded in memory
问题描述
对于我的工作,我经常从终端打开文件列表.
For my job i'm frequently opening lists of files from the terminal.
当我使用vscode进行此操作时,将打开它们并且所有选项卡都在其中.但是,只有我单击并查看过的文件才会加载到内存中.
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.
推荐答案
正在努力减少"hacky".
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
他使用"hack"使其正常工作: https://github.com/microsoft/vscode/issues/15178#issuecomment-283072868
He used a 'hack' to get it to work: https://github.com/microsoft/vscode/issues/15178#issuecomment-283072868
它说他使用了'workbench.action.nextEditor'来使其工作,但是我在他的代码中看不到这一点,因此他现在必须使用其他方法. https://github.com/eamodio/vscode-restore-editors
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
这篇关于在vscode中打开多个文件时,实际上只有第一个文件加载到内存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!