Skip to content

Commit 508b4d4

Browse files
committed
Add header for the run-command variables
1 parent 2bc0fd1 commit 508b4d4

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

content/docs/config-files.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -186,36 +186,38 @@ When not empty, this node contains `<Command>` tags, which have the command stri
186186
**Attributes for the `<Command>` tag**
187187

188188

189-
Position | Name | Value format | Meaning
190-
:--------|:-----|:-------------|:---
191-
1 | name | string | The name of the Run command.
192-
2 | Ctrl | "yes"/"no" | The key mapped to has the Control modifier
193-
3 | Alt | "yes"/"no" | The key mapped to has the Alt modifier
194-
4 | Shift | "yes"/"no" | The key mapped to has the Shift modifier
195-
5 | Key | integer | The base virtual key number, in the 1 - 255 range
196-
6 | FolderName | string | Can be used to group one or more Run menu entries into a named sub-menu (new to v8.4.8)
189+
| Position | Name | Value format | Meaning
190+
|:--------|:-----|:-------------|:---
191+
| 1 | name | string | The name of the Run command.
192+
| 2 | Ctrl | "yes"/"no" | The key mapped to has the Control modifier
193+
| 3 | Alt | "yes"/"no" | The key mapped to has the Alt modifier
194+
| 4 | Shift | "yes"/"no" | The key mapped to has the Shift modifier
195+
| 5 | Key | integer | The base virtual key number, in the 1 - 255 range
196+
| 6 | FolderName | string | Can be used to group one or more Run menu entries into a named sub-menu (new to v8.4.8)
197197

198198
_Note_: FolderName can only be entered by hand-editing the `shortcuts.xml` file; it is not available in the Shortcut Mapper or any other GUI element.
199199

200200
Although it is possible for several commands to have the same name, this is confusing and thus discouraged.
201201

202202
The run command may contain any valid command for the <abbr title="Operating System: Generally Windows. If you use Notepad++ in a Linux WINE environment or similar, could you create a pull request clarifying whether it's windows-style command syntax or linux-style command syntax.">Windows OS</abbr>. If you use a command that can be found in your PATH (like `cmd.exe`), then you don't need to specify the full path to the command. If it's not in your path, then you _should_ specify the full path. Note that Windows will launch your default browser if you put a URL in this. If the command, or one of its arguments, has an embedded space, then put quotes around it (like you would for any command line environment). For example, `<Command name="Run Putty" ... >"c:\program files\putty\putty.exe" -ssh -load "my session"</Command>` shows the quotes around the executable and one of the arguments, because both have spaces. (That same command in the **Run**-menu's **Run...** action dialog would need to be `"c:\program files\putty\putty.exe" -ssh -load "my session"` to encapsulate all the paths with spaces inside double-quotes.)
203203

204-
There are a number of Notepad++-specific variables available, which are accessed in the form `$(VARIABLE_NAME)`, which can be used to supply portions of the command entry (whether creating the command in the `shortcuts.xml` or through the **Run > Run...** entry).
205-
206-
Variable | Description | Example
207-
--------------------|:--- |:---
208-
FULL_CURRENT_PATH | The full path to the active file | `E:\My Web\main\welcome.html`
209-
CURRENT_DIRECTORY | The active file's directory | `E:\My Web\main`
210-
FILE_NAME | The active file's name | `welcome.html`
211-
NAME_PART | The filename without extension | `welcome`
212-
EXT_PART | The extension (with the `.`) | `.html`
213-
CURRENT_WORD | the active selection in Notepad++, or the word under the [caret](#caret-and-cursor "typing/insertion cursor") |
214-
CURRENT_LINE | the line number where the [caret](#caret-and-cursor "typing/insertion cursor") is currently located in the editor window | `1`
215-
CURRENT_LINESTR | the text of the current line (added v8.3.2) | `The quick brown fox jumps over the lazy dog`
216-
CURRENT_COLUMN | the column number where the [caret](#caret-and-cursor "typing/insertion cursor") is currently located in the editor window | `5`
217-
NPP_DIRECTORY | the directory where the `notepad++.exe` executable is located | `c:\Program Files\notepad++`
218-
NPP_FULL_FILE_PATH | the full path to the `notepad++.exe` | `c:\Program Files\notepad++\notepad++.exe`
204+
#### Variables for Run Commands
205+
206+
There are a number of Notepad++-specific variables available for Run commands, which are accessed in the form `$(VARIABLE_NAME)`, which can be used to supply portions of the command entry (whether creating the command in the `shortcuts.xml` or through the **Run > Run...** entry).
207+
208+
| Variable | Description | Example
209+
|:--------------------|:--- |:---
210+
| FULL_CURRENT_PATH | The full path to the active file | `E:\My Web\main\welcome.html`
211+
| CURRENT_DIRECTORY | The active file's directory | `E:\My Web\main`
212+
| FILE_NAME | The active file's name | `welcome.html`
213+
| NAME_PART | The filename without extension | `welcome`
214+
| EXT_PART | The extension (with the `.`) | `.html`
215+
| CURRENT_WORD | the active selection in Notepad++, or the word under the [caret](#caret-and-cursor "typing/insertion cursor") |
216+
| CURRENT_LINE | the line number where the [caret](#caret-and-cursor "typing/insertion cursor") is currently located in the editor window | `1`
217+
| CURRENT_LINESTR | the text of the current line (added v8.3.2) | `The quick brown fox jumps over the lazy dog`
218+
| CURRENT_COLUMN | the column number where the [caret](#caret-and-cursor "typing/insertion cursor") is currently located in the editor window | `5`
219+
| NPP_DIRECTORY | the directory where the `notepad++.exe` executable is located | `c:\Program Files\notepad++`
220+
| NPP_FULL_FILE_PATH | the full path to the `notepad++.exe` | `c:\Program Files\notepad++\notepad++.exe`
219221

220222
If the variable contains one or more space characters in the path, like `$(FULL_CURRENT_PATH)` being `C:\Path With Spaces\Goes\Here.txt`, then you should include quotes around the variable, like `"c:\Program Files\App Name\blah.exe" "$(FULL_CURRENT_PATH)"`
221223

0 commit comments

Comments
 (0)