Difference between revisions of "NotepadPlusPlus File Navigation"
Jump to navigation
Jump to search
Steph.dufour (talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
<li>Select the ''Run >>> Run'' menu items.</li> | <li>Select the ''Run >>> Run'' menu items.</li> | ||
<li>In the Run dialogue paste in the following text:</li> | <li>In the Run dialogue paste in the following text:</li> | ||
− | <tt>$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)/$(CURRENT_WORD)</tt><br> | + | <tt>"$(NPP_DIRECTORY)\notepad++.exe" "$(CURRENT_DIRECTORY)/$(CURRENT_WORD)"</tt><br> |
<li>Select Save and name the item '''Open File (Relative)'''. Set an appropriate shortcut key (Alt + Spacebar).</li> | <li>Select Save and name the item '''Open File (Relative)'''. Set an appropriate shortcut key (Alt + Spacebar).</li> | ||
− | <li>To use the item select the filename of the file you wish to open (including relative references and extension). Select Run Open File (Relative) or use the shortcut key set ( | + | <li>To use the item select the filename of the file you wish to open (including relative references and extension). Select Run Open File (Relative) or use the shortcut key set (Alt + Spacebar).<br> |
If the file opens when using the dropdown menu but does not open when using the shortcut key, the shortcut chosen may have already been pre-defined for another application. Modify the shortcut key and try again. <br> | If the file opens when using the dropdown menu but does not open when using the shortcut key, the shortcut chosen may have already been pre-defined for another application. Modify the shortcut key and try again. <br> | ||
Line 21: | Line 21: | ||
<UserDefinedCommands> | <UserDefinedCommands> | ||
<Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> | <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> | ||
− | <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112"> | + | <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112">https://www.php.net/%20$(CURRENT_WORD)</Command> |
− | <Command name="Google Search" Ctrl="no" Alt="yes" Shift="no" Key="113"> | + | <Command name="Google Search" Ctrl="no" Alt="yes" Shift="no" Key="113">https://www.google.com/search?q=$(CURRENT_WORD)</Command> |
− | <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114"> | + | <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command> |
<Command name="Open file" Ctrl="no" Alt="yes" Shift="no" Key="116">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD)</Command> | <Command name="Open file" Ctrl="no" Alt="yes" Shift="no" Key="116">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD)</Command> | ||
<Command name="Open file (relative)" Ctrl="no" Alt="yes" Shift="no" Key="32">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)/$(CURRENT_WORD)</Command> | <Command name="Open file (relative)" Ctrl="no" Alt="yes" Shift="no" Key="32">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)/$(CURRENT_WORD)</Command> |
Latest revision as of 14:57, 18 July 2024
-
To allow user to open a file with a relative path (e.g. ..\model\geometry_001.tgc) from within Notepad++ we need to setup a new run item.
- Select the Run >>> Run menu items.
- In the Run dialogue paste in the following text: "$(NPP_DIRECTORY)\notepad++.exe" "$(CURRENT_DIRECTORY)/$(CURRENT_WORD)"
- Select Save and name the item Open File (Relative). Set an appropriate shortcut key (Alt + Spacebar).
- To use the item select the filename of the file you wish to open (including relative references and extension). Select Run Open File (Relative) or use the shortcut key set (Alt + Spacebar).
If the file opens when using the dropdown menu but does not open when using the shortcut key, the shortcut chosen may have already been pre-defined for another application. Modify the shortcut key and try again.
The selected file should open in a new tab.
TIP: The shortcuts can be found and edited in the shortcuts.xml file stored on your machine. The easiest way to find this is to search for it, on my computer it is located here: C:\Users\username\AppData\Roaming\Notepad++\
This file includes all of the commands for the shortcuts in your "Run" menu.
<UserDefinedCommands> <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112">https://www.php.net/%20$(CURRENT_WORD)</Command> <Command name="Google Search" Ctrl="no" Alt="yes" Shift="no" Key="113">https://www.google.com/search?q=$(CURRENT_WORD)</Command> <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command> <Command name="Open file" Ctrl="no" Alt="yes" Shift="no" Key="116">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD)</Command> <Command name="Open file (relative)" Ctrl="no" Alt="yes" Shift="no" Key="32">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)/$(CURRENT_WORD)</Command> <Command name="Open in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) -nosession -multiInst</Command> <Command name="Open containing folder" Ctrl="no" Alt="no" Shift="no" Key="0">explorer $(CURRENT_DIRECTORY)</Command> <Command name="Open current dir cmd" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /K cd $(CURRENT_DIRECTORY)</Command> <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a "$(FULL_CURRENT_PATH)"</Command> <Command name="TUFLOW 2011-09-w64-iSP" Ctrl="no" Alt="no" Shift="no" Key="0">"C:\TUFLOW\Releases\2011-09\w64\TUFLOW_iSP_w64.exe" "$(FULL_CURRENT_PATH)"</Command> </UserDefinedCommands>