[英]Open default file when folder is selected in VSCode
I've started migrating my note-taking from CherryTree to VSCode.我已经开始将我的笔记从 CherryTree 迁移到 VSCode。 In CherryTree, you can add notes to any node in the treeview (ie: there is no distinction between folders and files).在 CherryTree 中,您可以向树视图中的任何节点添加注释(即:文件夹和文件之间没有区别)。
To get similar organization in VSCode with folders and files, I want to put notes linked to the folder node in a default file for that folder (ex: "!.txt" or "!.md").为了在 VSCode 中使用文件夹和文件获得类似的组织,我想将链接到文件夹节点的注释放在该文件夹的默认文件中(例如:“!.txt”或“!.md”)。
Is there a way (setting, existing extension or code snippet for new extension) that will let VSCode open the default file ("!.txt") when the folder is clicked in the treeview, just like it opens files that are directly clicked?有没有办法(设置、现有扩展或新扩展的代码片段)让 VSCode 在树视图中单击文件夹时打开默认文件(“!.txt”),就像它打开直接单击的文件一样? That would help the tree structure feel more natural, being able to add notes to any node (file or folder) in the treeview.这将有助于树结构感觉更自然,能够向树视图中的任何节点(文件或文件夹)添加注释。
Given this issue https://github.com/Microsoft/vscode/issues/3553 (Get selected file/folder in the explorer view) is unresolved I think it is probably not currently possible to detect which folder(s) is selected in the explorer tree in order to use that information to open a file in the selected folder.鉴于此问题https://github.com/Microsoft/vscode/issues/3553 (在资源管理器视图中获取选定的文件/文件夹)未解决我认为目前可能无法检测在资源管理器树,以便使用该信息打开所选文件夹中的文件。 You might consider upvoting the issue.您可能会考虑对该问题进行投票。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.