Notepad++设置快捷键及外部命令

本文详细介绍了Notepad++的快捷键配置,包括内部命令、宏定义、用户自定义命令及插件命令等,展示了如何通过XML配置文件实现个性化编辑体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<NotepadPlus>
    <InternalCommands>
        <Shortcut id="41020" Ctrl="no" Alt="yes" Shift="yes" Key="82" />
    </InternalCommands>
    <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>
    <UserDefinedCommands>
        <Command name="Launch in Firefox" Ctrl="no" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command>
        <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome "$(FULL_CURRENT_PATH)"</Command>
        <Command name="Get php help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/$(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 in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command>
        <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a "$(FULL_CURRENT_PATH)"</Command>
        <Command name="complie" Ctrl="yes" Alt="no" Shift="no" Key="77">cmd /k gcc -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" "$(FULL_CURRENT_PATH)" & pause & exit</Command>
        <Command name="run_c" Ctrl="no" Alt="yes" Shift="no" Key="75">cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"</Command>
        <Command name="ComplieC++" Ctrl="yes" Alt="no" Shift="no" Key="77">cmd /k g++ -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe" "$(FULL_CURRENT_PATH)" & pause & exit</Command>
        <Command name="run_c++" Ctrl="no" Alt="yes" Shift="no" Key="75">cmd /k "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"</Command>
        <Command name="Astyle" Ctrl="yes" Alt="yes" Shift="no" Key="65">"D:\Program Files\AStyle\bin\AStyle.exe" --style=ansi -S -N -n -Y "$(FULL_CURRENT_PATH)" "$(FULL_CURRENT_PATH)"</Command>
        <Command name="run_python" Ctrl="yes" Alt="yes" Shift="no" Key="80">cmd /k python "$(FULL_CURRENT_PATH)" & ECHO. & PAUSE & EXIT</Command>
    </UserDefinedCommands>
    <PluginCommands>
        <PluginCommand moduleName="MathPad.dll" internalID="3" Ctrl="yes" Alt="yes" Shift="no" Key="50" />
        <PluginCommand moduleName="MathPad.dll" internalID="4" Ctrl="yes" Alt="yes" Shift="no" Key="51" />
        <PluginCommand moduleName="LightExplorer.dll" internalID="0" Ctrl="no" Alt="yes" Shift="yes" Key="65" />
        <PluginCommand moduleName="NppCCompletionPlugin.dll" internalID="1" Ctrl="no" Alt="yes" Shift="no" Key="32" />
    </PluginCommands>
    <ScintillaKeys />
</NotepadPlus>

以上文件路径如下:C:\Users\Administrator\AppData\Roaming\Notepad++\shortcuts.xml  

转载于:https://www.cnblogs.com/CodeWorkerLiMing/p/11146427.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值