首页 > 代码库 > notepad++ 快捷键修改使之更符合Emacs的用户习惯

notepad++ 快捷键修改使之更符合Emacs的用户习惯

修改用户目录下的shortcuts.xml文件, 关键是有些设置和内部快捷键冲突,优先级比较低。通过录制宏并设置快捷键解决,例如ALT+F。
<NotepadPlus>
    <InternalCommands>
        <Shortcut id="41001" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <Shortcut id="41010" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <Shortcut id="43001" Ctrl="yes" Alt="no" Shift="no" Key="81" />
        <Shortcut id="43009" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <Shortcut id="42022" Ctrl="no" Alt="no" Shift="no" Key="0" />
    </InternalCommands>
    <Macros>
        <Macro name="Trim Trailing and save" Ctrl="no" Alt="no" Shift="no" Key="0">
            <Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
            <Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
        </Macro>
        <Macro name="word left" Ctrl="no" Alt="yes" Shift="no" Key="66">
            <Action type="0" message="2308" wParam="0" lParam="0" sParam="" />
        </Macro>
        <Macro name="word right" Ctrl="no" Alt="yes" Shift="no" Key="70">
            <Action type="0" message="2310" wParam="0" lParam="0" sParam="" />
        </Macro>
        <Macro name="line start" Ctrl="yes" Alt="no" Shift="no" Key="65">
            <Action type="0" message="2453" wParam="0" lParam="0" sParam="" />
        </Macro>
    </Macros>
    <UserDefinedCommands>
        <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox &quot;$(FULL_CURRENT_PATH)&quot;</Command>
        <Command name="Launch in IE" Ctrl="yes" Alt="yes" Shift="yes" Key="73">iexplore &quot;$(FULL_CURRENT_PATH)&quot;</Command>
        <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>
        <Command name="Launch in Safari" Ctrl="yes" Alt="yes" Shift="yes" Key="70">safari &quot;$(FULL_CURRENT_PATH)&quot;</Command>
        <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/%20$(CURRENT_WORD)</Command>
        <Command name="Google Search" Ctrl="no" Alt="yes" Shift="no" Key="113">http://www.google.com/search?q=$(CURRENT_WORD)</Command>
        <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">http://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 in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD) -nosession -multiInst</Command>
        <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a &quot;$(FULL_CURRENT_PATH)&quot;</Command>
    </UserDefinedCommands>
    <PluginCommands>
        <PluginCommand moduleName="DSpellCheck.dll" internalID="2" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <PluginCommand moduleName="DSpellCheck.dll" internalID="0" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <PluginCommand moduleName="DSpellCheck.dll" internalID="3" Ctrl="no" Alt="no" Shift="no" Key="0" />
        <PluginCommand moduleName="DSpellCheck.dll" internalID="1" Ctrl="no" Alt="yes" Shift="no" Key="70" />
    </PluginCommands>
    <ScintillaKeys>
        <ScintKey ScintID="2300" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="40">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="78" />
        </ScintKey>
        <ScintKey ScintID="2302" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="38">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="80" />
        </ScintKey>
        <ScintKey ScintID="2314" menuCmdID="0" Ctrl="yes" Alt="no" Shift="no" Key="69" />
        <ScintKey ScintID="2451" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="35">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="69" />
        </ScintKey>
        <ScintKey ScintID="2013" menuCmdID="42007" Ctrl="yes" Alt="no" Shift="yes" Key="65" />
        <ScintKey ScintID="2326" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="8">
            <NextKey Ctrl="no" Alt="no" Shift="yes" Key="8" />
        </ScintKey>
        <ScintKey ScintID="2308" menuCmdID="0" Ctrl="no" Alt="yes" Shift="no" Key="66">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="66" />
        </ScintKey>
        <ScintKey ScintID="2310" menuCmdID="0" Ctrl="no" Alt="yes" Shift="no" Key="70">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="39" />
        </ScintKey>
        <ScintKey ScintID="2304" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="37">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="66" />
        </ScintKey>
        <ScintKey ScintID="2306" menuCmdID="0" Ctrl="no" Alt="no" Shift="no" Key="39">
            <NextKey Ctrl="yes" Alt="no" Shift="no" Key="70" />
        </ScintKey>
    </ScintillaKeys>
</NotepadPlus>




notepad++ 快捷键修改使之更符合Emacs的用户习惯