简体   繁体   English

在 VSCode 中选择文件夹时打开默认文件

[英]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.

相关问题 如何使用预先选择的文件在 vscode 中打开文件夹选择器对话框? - How to open folder picker dialog in vscode with a pre-selected file? 如何打开vscode默认文件? - How to open the vscode default file? 即使打开不同文件夹中的文件,VSCode 也能始终打开默认文件夹(用于 Ctrl + P 搜索)吗? - Can VSCode always open a default folder (for Ctrl + P searching) even if opening a file in different folder? VSCode 远程容器 — 如何打开 VSCode 的容器实例中的默认文件夹? - VSCode Remote Container — how to open the default folder in the container instance of VSCode? 使用简单文件对话框时,是否可以在 VSCode 中获得组合的打开文件夹/打开文件对话框? - Is it possible to get a combined open folder/open file dialog in VSCode when using the simple file dialog? VSCode不使用Nautilus打开文件或文件夹 - VSCode does not use nautilus to open a file or folder VScode(突然)不会打开文件夹 - VScode(suddenly) will not open a folder 不在默认的“/test”文件夹中时使用带有 VScode 的 Mocha 测试资源管理器 - Using Mocha Test Explorer with VScode when not in default `/test' folder VSCode打开工作区文件夹热键 - VSCode open workspace folder hotkey VSCode:无法打开文件 - VSCode : Unable to open file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM