Skip to content

Commit

Permalink
README.md: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Binsztok committed Apr 15, 2015
1 parent a1a6af9 commit 67b58c5
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions README.txt → README.md
@@ -1,6 +1,7 @@
This is the Opa plugin for Sublime Text 2.
Opa: http://opalang.org
Sublime: http://www.sublimetext.com/
**This is the Opa plugin for Sublime Text 2/3**

- Opa: http://opalang.org
- Sublime Text: http://www.sublimetext.com/

# Plugin Features

Expand All @@ -12,19 +13,15 @@ Sublime: http://www.sublimetext.com/

# How to install the Opa plugin ?

1) Get https://github.com/downloads/MLstate/OpaSublimeText/Opa.sublime-package

2) Move it to ~/.config/sublime-text2/Installed Packages/ (linux)
or %APPDATA%\Sublime Text 2\Installed Packages\ (windows)
or ~/Library/Application Support/Sublime Text 2/Installed Packages (mac)

3) Start sublime and check that menu entry [View -> Syntax -> Opa] is present
If not verify 1) and 2) and restart sublime again and again

1) Download the [package](https://github.com/downloads/MLstate/OpaSublimeText/Opa.sublime-package)
2) 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)
3) 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?

File with .opa extension should automatically get syntax highlighting. If not, please make sure you are using the Opa plugin [View -> Syntax -> Opa].
Files with `.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?

Expand All @@ -33,39 +30,38 @@ Choose a build system:
- [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.

Then press 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 F4.
Then press `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 `F4`.

# FAQ

## 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.
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?

Press F7 or [Tools -> Opa -> Run]
The compilation is done automatically, but there is a sync problem.
Press `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.

# Other Features

- 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:

1) Install the AAAPackage Dev and Package Control Sublime packages
2) Transform Opa.JSON-tmLanguage:
- Open the file
Expand All @@ -76,6 +72,6 @@ You can build the Sublime package yourself if you want:

# Questions, contributions

Please use github Issues, fork and contribute Pull Requests to make the Opa plugin rock as much as possible.
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.

Thanks!

0 comments on commit 67b58c5

Please sign in to comment.