Skip to content

Commit 3da0ea7

Browse files
authored
Document new predefined variable ${columnNumber} (#8009)
* Add example for predefined variable `${fileDirnameBasename}` * Docu new predefined variable `${columnNumber}` See https://code.visualstudio.com/updates/v1_97#_column-number-variable.
1 parent 2ff73f7 commit 3da0ea7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/editor/variables-reference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The following predefined variables are supported:
2929
- **${fileDirnameBasename}** - the current opened file's folder name
3030
- **${cwd}** - the task runner's current working directory upon the startup of VS Code
3131
- **${lineNumber}** - the current selected line number in the active file
32+
- **${columnNumber}** - the current selected column number in the active file
3233
- **${selectedText}** - the current selected text in the active file
3334
- **${execPath}** - the path to the running VS Code executable
3435
- **${defaultBuildTask}** - the name of the default build task
@@ -53,9 +54,11 @@ So you will have the following values for each variable:
5354
- **${relativeFileDirname}** - `folder`
5455
- **${fileBasename}** - `file.ext`
5556
- **${fileBasenameNoExtension}** - `file`
56-
- **${fileDirname}** - `/home/your-username/your-project/folder`
5757
- **${fileExtname}** - `.ext`
58+
- **${fileDirname}** - `/home/your-username/your-project/folder`
59+
- **${fileDirnameBasename}** - `folder`
5860
- **${lineNumber}** - line number of the cursor
61+
- **${columnNumber}** - column number of the cursor
5962
- **${selectedText}** - text selected in your code editor
6063
- **${execPath}** - location of Code.exe
6164
- **${pathSeparator}** - `/` on macOS or linux, `\` on Windows

0 commit comments

Comments
 (0)