Opa mode for Sublime Text
- Total 282
- Win 111
- Mac 105
- Linux 66
|Mar 29||Mar 28||Mar 27||Mar 26||Mar 25||Mar 24||Mar 23||Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 29||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14|
This is the Opa plugin for Sublime Text 2/3
- Syntax highlighting
- Build system
- Code completion
- Contextual access to the online API documentation
- Tutorials (one for now)
How to install the Opa plugin ?
- Download the package
- Move it to
~/.config/sublime-text(2)/Installed Packages/(linux) or
%APPDATA%\Sublime Text( 2)\Installed Packages\(windows) or
~/Library/Application Support/Sublime Text( 2)/Installed Packages(mac)
- Start sublime and check that menu entry [View -> Syntax -> Opa] is present. If not verify 1) and 2) and restart sublime again and again.
How to have syntax highlighting?
.opa extension should automatically get syntax highlighting. If not, please make sure you are using the Opa plugin [View -> Syntax -> Opa].
How to build my application?
Choose a build system:
- [Tools -> Build -> Build System -> Opa-All] builds all Opa files in the current directory
- [Tools -> Build -> Build System -> Opa-One] builds the single Opa source code you are editing
- [Tools -> Build -> Build System -> Opa-Conf] uses opa conf files from the current directory.
F7 or launch from the menu [Tools -> Opa -> Build].
If there are compilation errors such as parsing or typing errors, you can navigate between them using
Can I use the classic Opa syntax?
Yes, the Opa plugin also supports the classic syntax of Opa. Edit
Opa-XXX.sublime-build, and add
--parser classic in the cmd field just after opa.
How to run my application?
F7 or [Tools -> Opa -> Run]
The compilation is done automatically, but there is a sync problem awaiting a fix.
So it's safer to build before for now.
- Hit [ctrl+d] or [right-click -> Opa Doc] to query doc.opalang.org for the highlighted word
- The Opa plugin features code completion on the Opa standard library. Try it, for instance by typing “Lfo” to expand to List.fold.
- The plugin also features skeletons for several Opa constructs. Try it, for instance by typing “function”, select the completion, then:
- enter the function name
- press “tab”
- enter the function body
- press tab
- You can also play with the (first) tutorial by typing “TUTORIAL” and selecting the completion.
Install from Source
Copy the content of the plugin repository to a new Opa directory in your Sublime directory.
You can build the Sublime package yourself if you want:
- Install the AAAPackage Dev and Package Control Sublime packages
- Transform Opa.JSON-tmLanguage:
- Open the file
- Select build system json to tmLanguage
- Hit [ctrl+p -> “Package Control: Create Package File” -> “Opa”]
- You should have the plugin in Opa.sublime-package
Please use GitHub Issues for bugs. You are welcome to fork and contribute Pull Requests to make the Opa plugin rock as much as possible.