vscode 常用变量

  • ${workspaceFolder} the path of the workspace folder that contains the tasks.json file
  • ${workspaceRootFolderName} the name of the folder opened in VS Code without any slashes (/)
  • ${file} the current opened file
  • ${relativeFile} the current opened file relative to the workspace folder containing the file
  • ${fileBasename} the current opened file‘s basename
  • ${fileBasenameNoExtension} the current opened file‘s basename without the extension
  • ${fileDirname} the current opened file‘s dirname
  • ${fileExtname} the current opened file‘s extension
  • ${cwd} the task runner‘s current working directory on startup
  • ${lineNumber} the current selected line number in the active file
原文地址:https://www.cnblogs.com/dzqdzq/p/12869073.html