Skip to content

Instantly share code, notes, and snippets.

@shhider
Last active August 25, 2021 11:18
Show Gist options
  • Save shhider/aaca9318b7296db244dc03b0596d7cd2 to your computer and use it in GitHub Desktop.
Save shhider/aaca9318b7296db244dc03b0596d7cd2 to your computer and use it in GitHub Desktop.
[VSCode things] #vscode
Variable description example
${workspaceFolder} the path of the folder opened in VS Code /home/your-username/your-project
${workspaceFolderBasename} the name of the folder opened in VS Code without any slashes (/) your-project
${file} the current opened file /home/your-username/your-project/folder/file.ext
${fileWorkspaceFolder} the current opened file's workspace folder /home/your-username/your-project
${relativeFile} the current opened file relative to workspaceFolder folder/file.ext
${relativeFileDirname} the current opened file's dirname relative to workspaceFolder folder
${fileBasename} the current opened file's basename file.ext
${fileBasenameNoExtension} the current opened file's basename with no file extension file
${fileDirname} the current opened file's dirname /home/your-username/your-project/folder
${fileExtname} the current opened file's extension .ext
${cwd} the task runner's current working directory on startup
${lineNumber} the current selected line number in the active file
${selectedText} the current selected text in the active file
${execPath} the path to the running VS Code executable location of Code.exe
${defaultBuildTask} the name of the default build task
${pathSeparator} the character used by the operating system to separate components in file paths / on macOS or linux, \ on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment