记录的宏存储在Notepad ++中的什么位置? [英] Where are the recorded macros stored in 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屋!