0.1.3 • Published 3 years ago

vscode-variables v0.1.3

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

VSCode Predefined Variable Parser

Predefined variables The following predefined variables are supported:

${workspaceFolder} - the path of the folder opened in VS Code
${workspaceFolderBasename} - the name of the folder opened in VS Code without any slashes (/)
${file} - the current opened file
${fileWorkspaceFolder} - the current opened file's workspace folder
${relativeFile} - the current opened file relative to workspaceFolder
${relativeFileDirname} - the current opened file's dirname relative to workspaceFolder
${fileBasename} - the current opened file's
${fileBasenameNoExtension} - the current opened file's basename with no file 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
${selectedText} - the current selected text in the active file
${pathSeparator} - the character used by the operating system to separate components in file paths
${env:<variable>} - return the env variable
${config:<variable>} - return the settings configuration

Install the package:

npm i -S vscode-variables

Using the package

Once

const vscodeVariables = require('vscode-variables');

vscodeVariables('${file}'); //will return the fsPath of the file.

Recursive

const vscodeVariables = require('vscode-variables');

vscodeVariables('${file}',true); //will return the fsPath of the file.
0.1.3

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago

0.1.1

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago