简体   繁体   中英

Open default file when folder is selected in VSCode

I've started migrating my note-taking from CherryTree to VSCode. In CherryTree, you can add notes to any node in the treeview (ie: there is no distinction between folders and files).

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").

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? 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. You might consider upvoting the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM