Notepad ++: shortcut for new commands "Open containing folder in ..."

Notepad ++ v6.5.3 + added new menu commands: Open Containing Folder in Explorerand Open Containing Folder in cmd, but it was not possible to add new menu items to Shortcut Mapper so that they could be mapped to shortcuts.

Can I create shortcuts for these commands?

I know that there are extensions and startup commands that can do similar things, but I would prefer to use the new built-in functionality.

+3
source share
2 answers

(TL; DR at the end.)

It turns out that you can use the built-in Notepad ++ macros for this, but you will have to manually edit them (compared to writing them).

, , - shortcuts.xml, %APPDATA%\Notepad++\shortcuts.xml. : , Notepad ++.

Notepad ++? Resource Hacker wParams. ++. Exe :

resource hacker screenshot

.

shortcuts.xml:

<Macros>
    <Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
        <Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
        <Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
    </Macro>
</Macros>

"Trim Trailing and save", . , Action wParam 41006 Save, Resource Hacker, , , .

, , , wParam Action Resource Hacker, , :

<Macro name="Open Containing Folder in Explorer" Ctrl="no" Alt="no" Shift="no" Key="0">
    <Action type="2" message="0" wParam="41019" lParam="0" sParam="" />
</Macro>
<Macro name="Open Containing Folder in cmd" Ctrl="no" Alt="no" Shift="no" Key="0">
    <Action type="2" message="0" wParam="41020" lParam="0" sParam="" />
</Macro>

, Notepad ++ "" Mapper , .

TL; DR

shortcuts.xml Mapper Notepad ++.

+4

" shortcuts.xml" [ : C:\Users\_\AppData\\ ++]

2 <UserDefinedCommands> ..</UserDefinedCommands> .

<Command name="Open Containing Folder in Explorer" Ctrl="yes" Alt="yes" Shift="no" Key="69">explorer /select,$(FULL_CURRENT_PATH)</Command>
<Command name="Open Containing Folder in cmd" Ctrl="yes" Alt="yes" Shift="no" Key="84">cmd /K cd /d $(CURRENT_DIRECTORY)</Command>

: , Ctrl, Alt, Shift Key ( ASCII )

(re) Notepad ++. ""

+1

All Articles