zoukankan      html  css  js  c++  java
  • 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.
  • 相关阅读:
    类和迭代器
    使用委托调用函数
    自定义类和集合
    带函数的参数返回函数的最大值
    使用程序调试输出窗口
    自定义类
    类和结构
    全局参数
    带参数的函数返回数组之和
    IS运算符
  • 原文地址:https://www.cnblogs.com/weihongji/p/3493064.html
Copyright © 2011-2022 走看看