Oz language support for Sublime Text 3. This plugin intends to be an alternative to the classic Emacs Oz interface. It is however still in work. Particularly killing subprocesses is still not correctly implemented and not automatic.
The main feature that needs input from the user is feed buffer. In order to do so, you should first start the ozengine subprocess. Just press Ctrl-. + Ctrl-s. Then at any time, you can press Ctrl-. + Ctrl-b to feed the buffer. Please note that once you started the engine subprocess you will need to kill it even after closing Sublime Text. In Unix like systems, you can run pkill ozengine ozemulator ozwish to make sure you cleaned everything after closing Sublime Text.
- Syntax Highlighting - detects files matching the pattern
*.oz
. - Comments - Applies Oz-style single line (%) comments using standard commands/shortcuts.
- Feed Buffer - Feed the current buffer, compile and execute it within ozengine as in the classic OPI
Sublime/Oz is available from Package Control under the name Oz
.
This package contains only the syntax Highlighting and Comments. If you wish to
use the build/run features you need to install the plugin manualy.
Download this repo as an archive or git clone
it under the Packages\User
directory under your Sublime user path.
On Windows, this is something like C:\Users\%USER_NAME%\AppData\Roaming\Sublime Text 3\Packages
.
On linux, this is something like /home/user/.config/sublime-text-3
Once the sublime-oz
package is in place, just restart Sublime, and it should be ready to go.
The Oz Programming Interface is started with the plugin command view.run_run_command(oz_run). This command calls ozengine x-oz://system/OPI.ozf. This creates two sockets to communicate with the process. The first one, allows to give instruction to the compiler and the second one is used for special instruction, for example start the debugger. We connect to the first one using socket_pipe.py. Please note that this file is a simple modification of pre-existing Class from this repository The message we send to this socket is actually very simple. We just send what we want to compile and add this \n\004\n.
- Snippets
- Feed line/Feed region
- Formatting
- Killing at close ozengine/ozemulator(on Unix like)/ozwish(if Browse is used)
- Redirect compilation and emulator output.
Pull requests welcome. The latest version of Sublime should have everything you need to develop and test enhancements to this package.