vscode solves the path jump problem of path alias

1. Install the vscode path-aliasplugin

Open vscode editor -> Ctrl+Shift+Xopen 扩展:商场-> search path-alias-> install

2. Custom path alias configuration

Open vscode editor -> Ctrl+Shift+Popen 命令面板-> search settings.json-> select Preferences: Open User Settings(JSON)-> add the following configuration

  "pathAlias.aliasMap": {
    
    
    "@": "${cwd}/src"
  }

which can be used ${cwd}instead of the absolute path of the current working directory. For example, if I want to use the directory @ representing my working directory src, then I only use it in the configuration "@": "${cwd}/src".

3. File jump of path alias

After the configuration is complete, use Ctrl+鼠标左键it to realize the file jump of the path alias.

Guess you like

Origin blog.csdn.net/letianxf/article/details/128309400