Today’s recommendation is a very useful plug-in — Path Autocomplete

Generally, plug-ins are in a position to add to the cake. But this plugin is a lifesaver.

Why use Path Autocomplete?

When we are developing, we always worry about the path of introducing some resources and components. Because it’s too long, it’s too long, it’s too smelly.



So alias was born, which simplifies the way we write:

Configuration:

Writing:



But there is no path hint:

After Path Autocomplete is configured:

configuration

1. Download and install

2. Create jsconfig.js in the root directory and configure the alias

3. Create a. Vscode directory in the root directory and configure the root path of the project



The root path can be changed, currently to SRC, or to “${folder}/” to the project root.

That will do.

Current defects

I don’t know if I’m using it wrong or not, but if you set the root path below SRC, you won’t be able to identify directories other than SRC, such as public directories. However, if the root path is set to the root directory, only the first level directory can be identified. Down and only from the first layer, such as the SRC/assets/images/logo PNG, alias, if set images can’t to find it from images, only assets/images/logo PNG to find.