EV: Notepad++: Insert Timestamp -- Using Python

1. Select menu PluginsPython ScriptNew Script.
2. Create a script file "DateTime.py" for example. Then, input following statements in it:
import time
editor.addText(time.strftime('%Y-%m-%d %H:%M'))

3. Select menu PluginsPython ScriptConfiguration.

4. In Python Script Shortcut Configuration dialog,
1) Check radio button of "User Scripts"
2) Select the file you just created
3) Click [Add] button which is above "Menu Items" frame.
4) Click [OK] to close this dialog.
5. You will find there is an item of "DateTime" in PluginsPython Script
 
If you want to assign a shortcut to this item/command, please follow these steps:
1. Open Shortcut mapper dialog with menu path "SettingsShortcut Mapper".
2. Select tab of "Plugin commands"
3. Scroll the window to locate to the DateTime command.
4. Click [Modify] button and assign a shortcut for the DateTime command.
原文地址:https://www.cnblogs.com/weihongji/p/3493064.html