Home>

Please tell me about deleting files in Visual Studio Code.

When I tried to create a new file
It seems that I made a mistake, and the data that was originally on the desktop of my PC was shared with Visual Studio Code. (The PC uses Windows.)

When I delete a file in Visual Studio Code, the file disappears from the desktop of my PC. How can I unshare with Visual Studio Code?
Please write the details of your question here.

■■ The following error message occurred while implementing the function.

Error message
Corresponding source code
Source code
What I tried

Please describe here what you have tried for the problem.

Supplementary information (FW/tool version, etc.)

Please provide more detailed information here.

  • Answer # 1

    ProbablyCTRL + K,CTRL + OOrFile---Open folderI think you opened the desktop folder in, but is it correct?
    in that case,CTRL + K,FOrFile---Close folderIt will be closed with.

  • Answer # 2

    Close the folder from the file menu.

    Postscript

    vscode has a feature called "Open Folder" that allows you to perform file operations within vscode on the opened folder.
    You can also set the editor settings for each opened folder. In that case, you can change the key bindings, colors, and compilers depending on the folder.
    For example, when receiving requests from multiple companies, I think that necessary materials will be put together in a folder, but at that time, "This company uses clang to compile C ++, this company uses g ++ ..." The folder (setting file above) will remember it.