Sublime 插入時間插件

在選中的地方插入當前時間

import sublime, sublime_plugin
import time

class InsertTimeCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        self.view.insert(edit, self.view.sel()[0].begin(), time.strftime('%Y-%m-%d %H:%M:%S ',time.localtime(time.time())))
發佈了58 篇原創文章 · 獲贊 6 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章