Skip to content

Commit cc786f7

Browse files
committed
folder name and plugin depth clarifications
1 parent e6df018 commit cc786f7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

content/docs/config-files.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ All menu commands can be added to the Context Menu, including plugin commands:
7373
- Alternately, to add a built-in command, you may instead provide the menu command ID via the `id` attribute. The command ID values for a given menu can be found in your localization file (like [english.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml)), which will map the localized text you see in the menu to the command ID, or in [menuCmdID.h](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/menuCmdID.h).
7474
- For example, `<Item id="42001"/>` will add a context-menu entry that calls the **Edit > Cut** action by its command ID.
7575
- **NOTE**: `<Item id="0"/>` has a special meaning: it acts as a horizonal separator line -- that's how you can get a line between groups in the context menu.
76-
- To add a plugin command, you need to provide the plugin's menu item name (as it appears in the Plugins menu) as the value of the PluginEntryName attribute and the command's menu item name (as it appears in the plugin's sub-menu) as the value of the PluginCommandItemName attribute.
76+
- To add a plugin command, you need to provide the plugin's menu item name (as it appears in the Plugins menu) as the value of the PluginEntryName attribute and the command's menu item name (as it appears in the plugin's sub-menu) as the value of the PluginCommandItemName attribute. (_Note_: Context menu entries will only work for entries immediately under the plugin name; entries deeper than that, like **Plugins > Super Plugin Name > Submenu Here > I Want This Command**, will not work.)
7777
- For example: `<Item PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Encode" />` will add a context-menu entry that calls **Plugins > MIME Tools > Base64 Encode**
7878

7979
Note that the menu names and menu item names (whether built-in or plugin names) that you use in the should be in English, not in a translated language. The Shortcut Mapper can help you find the English name of plugin commands; simply switch to English localization for the raw name of built-in commands; or you can look at the [english.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml) that shipped with your distribution.
@@ -101,7 +101,7 @@ In brief, the structure of the context menu file is as follows
101101
- `<Item id="0" />` will make a separator line in the menu.
102102
- `ItemNameAs` attribute: Used for for [overriding a menu item name](#overriding-a-menu-item-name): using your own "display name" for a given entry in your context menu, instead of using the one inherited from the main Notepad++ menu system.
103103
- `PluginEntryName` attribute: Used for accessing Plugin commands. The value should be the name of the plugin as seen in the Plugins menu.
104-
- `PluginCommandItemName` attribute: Used for accessing Plugin commands. The value should be the name of the menu entry inside that Plugin's menu.
104+
- `PluginCommandItemName` attribute: Used for accessing Plugin commands. The value should be the name of the menu entry inside that Plugin's menu. (_Note_: Context menu entries will only work for entries immediately under the plugin name; entries deeper than that, like **Plugins > Super Plugin Name > Submenu Here > I Want This Command**, will not work.)
105105
- `FolderName` attribute: Used for [grouping items into sub-menus](#grouping-items-into-sub-menus) in the context menu.
106106
- `TranslateID` attribute: Used for auto-translating your sub-menu names. If the attribute's value matches one of the nodes in the `<MiscStrings>` section of [english.xml](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/english.xml) or similar translation files, the menu will use your active translation's value for the displayed FolderName.
107107
- As with all XML files, using `<!--` and `-->` around the code will "comment it out". So you can use text comments or comment out XML syntax that you want Notepad++ to ignore. To "uncomment" the XML, remove the `<!--` and `-->` surrounding that piece of code.
@@ -147,7 +147,9 @@ Position | Name | Value format | Meaning
147147
3 | Alt | "yes"/"no" | The key being mapped to has the Alt modifier
148148
4 | Shift | "yes"/"no" | The key being mapped to has the Shift modifier
149149
5 | Key | integer | The base virtual key number, in the 1..255 range
150-
6 | FolderName | string | Can be used to group one or more macros into a named sub-menu (new to v8.4.8)
150+
6 | FolderName | string | [optional] Can be used to group one or more macros into a named sub-menu (new to v8.4.8)
151+
152+
_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.
151153

152154
Although it is possible for several macros to share the same name or shortcut, this practice is highly discouraged.
153155

@@ -190,6 +192,8 @@ Position | Name | Value format | Meaning
190192
5 | Key | integer | The base virtual key number, in the 1 - 255 range
191193
6 | FolderName | string | Can be used to group one or more Run menu entries into a named sub-menu (new to v8.4.8)
192194

195+
_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.
196+
193197
Although it is possible for several commands to have the same name, this is confusing and thus discouraged.
194198

195199
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.

0 commit comments

Comments
 (0)