Created
September 28, 2018 10:42
-
-
Save christianwish/bc3d2ce00bf4846bc57eca3b3a3f3568 to your computer and use it in GitHub Desktop.
sublime text 3 clock plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
from datetime import datetime | |
class ExampleCommand(sublime_plugin.EventListener): | |
# def printInConsole(self, text): | |
# print(text) | |
def updateClock(self, view): | |
timeArr = str(datetime.now().time()).split(':', 3) | |
showTime = timeArr[0] + ":" + timeArr[1] | |
view.set_status("myClock", " ⏱ " + showTime + " ") | |
#view.show_popup_menu(["test 1", "test 2"], self.printInConsole) | |
def on_modified(self, view): | |
self.updateClock(view) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment