Is there a way to make a file recognize another folder in the same workspace?

Asked 1 years ago, Updated 1 years ago, 325 views

When you add two folders to the VS Code workspace as follows,

workspace
- - - - -
 ├ project
 │  ssample.html
 └ img
    └ sample.png

I would like to make sample.html recognize the img folder as if it were under the project folder so that it can access the files in the img folder as follows.

<img src=="img/sample.png">

Are there any workspace settings like this?

html vscode

2023-02-09 08:55

1 Answers

I can't.Editor settings should not affect HTML semantics.HTML files with the same content may be handled by different editors, and web browsers render HTML files to pages regardless of the editor.

It would be better to forget about the editor and try to find out if you can do what you want with the features of the web and the file system, and then think about whether you can reflect the settings in the editor.If you have any questions about this, please post a new question explaining how your page is organized and what you want to do.


2023-02-09 09:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.