├── .python-version ├── GhostText (OSX).sublime-settings ├── messages ├── 1.0.6.txt ├── 1.0.7.txt ├── 1.0.0.txt ├── 1.0.13.txt ├── 1.0.8.txt ├── 1.0.9.txt ├── 1.0.11.txt ├── 1.0.12.txt ├── 1.0.5.txt ├── install.txt ├── 1.0.10.txt ├── 1.0.4.txt ├── 1.0.3.txt ├── 1.0.2.txt └── 1.0.1.txt ├── GhostTextTools ├── __init__.py ├── WindowHelper.py ├── OnSelectionModifiedListener.py └── Utils.py ├── WebSocket ├── AbstractOnClose.py ├── AbstractOnMessage.py ├── AbstractHandler.py ├── Handshake.py ├── Frame.py └── WebSocketServer.py ├── GhostText.sublime-settings ├── .gitignore ├── messages.json ├── LICENSE ├── Main.sublime-menu ├── contributing.md ├── FocusSublimeWindow.py ├── README.md └── GhostText.py /.python-version: -------------------------------------------------------------------------------- 1 | 3.8 2 | -------------------------------------------------------------------------------- /GhostText (OSX).sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "view_title_prefix": { 3 | "connected": "👻🌕", 4 | "disconnected": "👻🌘" 5 | } 6 | } -------------------------------------------------------------------------------- /messages/1.0.6.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.6 2 | ===================================================== 3 | 4 | - New views are now in scratch mode. -------------------------------------------------------------------------------- /messages/1.0.7.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.7 2 | ===================================================== 3 | 4 | - Fixed disconnection bug on Windows machines. -------------------------------------------------------------------------------- /messages/1.0.0.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text has been released. 2 | 3 | If you where using ChromeTextArea, the previous name of this plugin, update your Chrome extension, too. -------------------------------------------------------------------------------- /messages/1.0.13.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.13 2 | ===================================================== 3 | 4 | - Fixed bug occurred when WebSocket has been closed at Server side. -------------------------------------------------------------------------------- /messages/1.0.8.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.8 2 | ===================================================== 3 | 4 | - Bugfix, the view does not get marked as disconnected when the client closes the connection. -------------------------------------------------------------------------------- /messages/1.0.9.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.9 2 | ===================================================== 3 | 4 | - Bugfix, the view does not get marked as disconnected when the client closes the connection. -------------------------------------------------------------------------------- /messages/1.0.11.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.11 2 | ===================================================== 3 | 4 | - Bugfix in the WebSocket server, WebSocket packets with a size of exactly 127 byte let the server crash. -------------------------------------------------------------------------------- /messages/1.0.12.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.12 2 | ===================================================== 3 | 4 | - Bugfix in the WebSocket component, the server can now handle connection requests which are longer than 1024 bytes. -------------------------------------------------------------------------------- /messages/1.0.5.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.5 2 | ===================================================== 3 | 4 | - Linux users should install xdotool which provides a better window focusing behavior as wmctrl, wmctrl is not longer supported. -------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text 2 | ========================== 3 | 4 | Visit https://ghosttext.fregante.com to install the extension for your browser (Chrome, Safari, Firefox). You can find more information on the welcome page after the browser extension is installed. 5 | -------------------------------------------------------------------------------- /GhostTextTools/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Guido Krömer' 2 | __license__ = 'MIT' 3 | __version__ = '0.1' 4 | __email__ = 'mail 64 cacodaemon 46 de' 5 | 6 | from .OnSelectionModifiedListener import OnSelectionModifiedListener 7 | from .WindowHelper import WindowHelper 8 | from .Utils import Utils 9 | -------------------------------------------------------------------------------- /WebSocket/AbstractOnClose.py: -------------------------------------------------------------------------------- 1 | from .AbstractHandler import AbstractHandler 2 | 3 | 4 | class AbstractOnClose(AbstractHandler): 5 | """ 6 | Abstract on connection close handler. 7 | """ 8 | 9 | def on_close(self): 10 | raise NotImplementedError("error message") 11 | -------------------------------------------------------------------------------- /WebSocket/AbstractOnMessage.py: -------------------------------------------------------------------------------- 1 | from .AbstractHandler import AbstractHandler 2 | 3 | 4 | class AbstractOnMessage(AbstractHandler): 5 | """ 6 | Abstract on message handler. 7 | """ 8 | 9 | def on_message(self, text): 10 | raise NotImplementedError("error message") 11 | -------------------------------------------------------------------------------- /messages/1.0.10.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.10 2 | ===================================================== 3 | 4 | - The new "close_view_on_disconnect" option enables auto closing of views, when the client disconnects. 5 | It is disabled by default and can be enabled by setting the flag to true. -------------------------------------------------------------------------------- /WebSocket/AbstractHandler.py: -------------------------------------------------------------------------------- 1 | class AbstractHandler: 2 | """ 3 | Abstract on whatever handler. 4 | """ 5 | 6 | def __init__(self): 7 | self._web_socket_server = None 8 | 9 | def set_web_socket_server(self, web_socket_server): 10 | self._web_socket_server = web_socket_server 11 | -------------------------------------------------------------------------------- /messages/1.0.4.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.4 2 | ===================================================== 3 | 4 | - Connection status indicator added, the indicator prefix can be modified in the config. 5 | 6 | - Closed views gets reused when starting a new connection, a view with a matching title has precede before any other closed view. -------------------------------------------------------------------------------- /GhostText.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "server_port": "4001", 3 | "new_window_on_connect": false, 4 | "close_view_on_disconnect": false, 5 | "default_syntax": "md", 6 | "host_to_syntax": { 7 | "sandbox.onlinephpfunctions.com": "php", 8 | "textarea.org": "html" 9 | }, 10 | "view_title_prefix": { 11 | "connected": "☗ ●", 12 | "disconnected": "☗ ☾" 13 | } 14 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # Packages 7 | *.egg 8 | *.egg-info 9 | dist 10 | build 11 | eggs 12 | parts 13 | bin 14 | var 15 | sdist 16 | develop-eggs 17 | .installed.cfg 18 | lib 19 | lib64 20 | __pycache__ 21 | 22 | # Installer logs 23 | pip-log.txt 24 | 25 | # Unit test / coverage reports 26 | .coverage 27 | .tox 28 | nosetests.xml 29 | 30 | # Translations 31 | *.mo 32 | 33 | # Mr Developer 34 | .mr.developer.cfg 35 | .project 36 | .pydevproject 37 | 38 | .idea 39 | SublimeText3Plugin/.idea 40 | 41 | ChromeExtension.pem -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "1.0.0": "messages/1.0.0.txt", 3 | "1.0.1": "messages/1.0.1.txt", 4 | "1.0.2": "messages/1.0.2.txt", 5 | "1.0.3": "messages/1.0.3.txt", 6 | "1.0.4": "messages/1.0.4.txt", 7 | "1.0.5": "messages/1.0.5.txt", 8 | "1.0.6": "messages/1.0.6.txt", 9 | "1.0.7": "messages/1.0.7.txt", 10 | "1.0.8": "messages/1.0.8.txt", 11 | "1.0.9": "messages/1.0.9.txt", 12 | "1.0.10": "messages/1.0.10.txt", 13 | "1.0.11": "messages/1.0.11.txt", 14 | "1.0.12": "messages/1.0.12.txt", 15 | "1.0.13": "messages/1.0.13.txt", 16 | "install": "messages/install.txt" 17 | } 18 | -------------------------------------------------------------------------------- /messages/1.0.3.txt: -------------------------------------------------------------------------------- 1 | GhostText for Sublime Text v 1.0.3 2 | ===================================================== 3 | 4 | - Fixed syntax detection, instead of the full resource path only the file name is need now, please use 'Markdown.tmLanguage' and not 'Packages/MarkdownEditing/Markdown.tmLanguage' anymore. 5 | 6 | - Fixed bug which lets the WebSocket sever crash when editing large text (An css file with 3k lines for example) with Ghost Text. 7 | 8 | - Fixed bug on Windows which let the status HTTP sever crash. 9 | 10 | - Plugin reload behavior has been improved, an exception where thrown on a HTTP server stop. -------------------------------------------------------------------------------- /messages/1.0.2.txt: -------------------------------------------------------------------------------- 1 | SublimeTextArea has become GhostText for Sublime Text 2 | ===================================================== 3 | 4 | Syntax detection by host name has been changed, now only the base name like "PHP.tmLanguage" is needed. 5 | If a not installed syntax like "Foo.tmLanguage" gets specified you will get informed about it! 6 | 7 | Usage 8 | ----- 9 | 10 | In Chrome, when you're in a page with a plain-text field (