记录的宏存储在Notepad ++中的什么位置? [英] Where are the recorded macros stored in Notepad++?

查看:405
本文介绍了记录的宏存储在Notepad ++中的什么位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我录制了一个宏,想与我的同事分享.

I have recorded a macro that I want to share with my work colleague.

这些记录的宏保存在什么位置,以便我可以将其添加到他的计算机中?

In what location are these recorded macros saved, so that I can add it to his machine?

如果感兴趣,该宏用于获取值列表并添加引号和逗号,以便可以在SQL查询(WHERE x IN ('value1','value2','value3'))的WHERE子句中使用.

If interested, the macro is for taking a list of values and adding quotes and comma so that it can be used in the WHERE clause of of an SQL query (WHERE x IN ('value1','value2','value3')).

推荐答案

在Windows中,宏保存在%AppData%\Notepad++\shortcuts.xml ( Windows徽标键+ E 复制并粘贴 %AppData%\Notepad++\)

In Windows the macros are saved at %AppData%\Notepad++\shortcuts.xml (Windows logo key + E and copy&paste %AppData%\Notepad++\)

或者:

  • 在Windows中< 7(包括Win2008/R2)宏保存在C:\Documents and Settings\%username%\Application Data\Notepad++\shortcuts.xml
  • 在Windows 7 | 8 | 10中 C:\Users\%username%\AppData\Roaming\Notepad++\shortcuts.xml
  • In Windows < 7 (including Win2008/R2) the macros are saved at C:\Documents and Settings\%username%\Application Data\Notepad++\shortcuts.xml
  • In Windows 7|8|10 C:\Users\%username%\AppData\Roaming\Notepad++\shortcuts.xml

注意:如果您要导出"任何新的宏,则需要关闭Notepad ++.

Note: You will need to close Notepad++ if you have any new macros you want to 'export'.

这里是一个例子:

<NotepadPlus>
    <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>
        <Macro name="abc" Ctrl="no" Alt="no" Shift="no" Key="0">
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="a" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="b" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="c" />
        </Macro>
    </Macros>
    <UserDefinedCommands>....

我添加了"abc"宏作为概念证明.

I added the 'abc' macro as a proof-of-concept.

这篇关于记录的宏存储在Notepad ++中的什么位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆