Additional variables such as the parent folder name and path for use in the window.title VSCode setting.
The following variables are exposed by this extension for use in window.title:
${parentPath}: file path of the parent folder to the current workspace folder (e.g. /Users/Development).${parentName}: name of the parent folder to the current workspace folder (e.g. Development).
For example, if you organize your GitHub projects on disk in the format GitHub/<username>/<repository>, you can set your window title to ${parentName}/${folderName} to show the GitHub username and repository name in the window title.
git clone git@github.com:MattIPv4/vscode-window-title-extras.gitnpm ci# Build once
npm run build
# Build and watch for changes
npm run watchUse F5 or Debug: Start Debugging in the command palette to run the extension in a new VSCode window. In the new window, open the workspace (or user) settings and set the window.title to test the functionality of the extension. For example:
{
"window.title": "${parentName}/${folderName}"
}In the host window, you can open the Run Extension debug console (Debug: Select Debug Console in the command palette) to see the output of the extension.
You can also test the extension against your local VSCode installation. To do this, the extension must be packaged with the vsce tool:
npx vsce packageThis will create a .vsix file in the root of the project. You can then install this file in your local VSCode installation by running the following command:
code --install-extension <path-to-vsix-file>Once installed, restart VSCode (or invoke Developer: Reload Window in the command palette) to start using the extension.
npm version <major|minor|patch> --no-git-tag-version- Sign in to the Visual Studio Marketplace.
- Access your Azure DevOps Profile (from the Visual Studio Marketplace navbar).
- Access your Azure DevOps organization (from the Azure DevOps Profile page).
- Go to
User settings(in the Azure DevOps navbar) >Personal access tokens. - Create a new token with the
Marketplace: Managescope.
VSCE_PAT=$TOKEN npx vsce publish