Browse files

Merge pull request #12 from hbbio/patch-2

Update README.txt
  • Loading branch information...
2 parents 2fa0f11 + b97547d commit 6d099046ce77f4056d7718aef21053aa3e812720 @OpaOnWindowsNow OpaOnWindowsNow committed Aug 14, 2012
Showing with 40 additions and 55 deletions.
  1. +40 −55 README.txt
@@ -1,15 +1,14 @@
-# Plugin functionalities :
+This is the Opa plugin for Sublime Text 2.
-1) Syntax highlighting (classic and js-like)
-2) Build systems (js-like and classic via manual modification)
-3) Completion based on the stdlib
+# Plugin Features
+1) Syntax highlighting
+2) Build system
+3) Code completion
4) Contextual access to the online API documentation
-5) Tutorials (one for now, many are coming)
+5) Tutorials (one for now)
# How to install the Opa plugin ?
@@ -23,74 +22,60 @@ or ~/Library/Application Support/Sublime Text 2/Installed Packages (mac)
If not verify 1) and 2) and restart sublime again and again
-# How to have syntax highlight ?
-File with opa extension should be colorised.
-You can force the colorisation using the menu:
-[View -> Syntax -> Opa]
+# How to have syntax highlighting?
-# How to build ?
+File with .opa extension should automatically get syntax highlighting. If not, please make sure you are using the Opa plugin [View -> Syntax -> Opa].
-Choose a build system.
-[Tools -> Build -> Build Sytem -> Opa-All]
-[Tools -> Build -> Build Sytem -> Opa-One]
+# How to build my application?
-Then press F7 or go in menu [Tools -> Opa -> Build].
+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.
-Opa-One will compile the file in the focused buffer.
-Opa-All will compile all files in the same directory as the focus buffer.
-Opa-Conf will compile the conf files in the same directory as the focus buffer.
+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.
-Press F4 to naviguate in compilation error, if any.
+# 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.
-# How to build with classic syntax ?
-Edit Opa-XXX.sublime-build, and add "--parser classic" in the cmd field just after opa.
-# How to run ?
+## How to run my application?
Press F7 or [Tools -> Opa -> Run]
The compilation is done automatically, but there is a sync problem.
So it's safer to build before for now.
+# Other Features
-# What else ?
+- Hit [ctrl+d] or [right-click -> Opa Doc] to query for the highlighted word
-- [ctrl+d] or [right-click -> Opa Doc] to go on
-- select some text then [ctr+d] or [right-click -> Opa Doc]
- will search the api with the selected text
-- same thing with [right-click -> Opa Doc]
+- The Opa plugin features code completion on the Opa standard library.
+ Try it, for instance by typing "Lfo" to expand to List.fold.
-- completion using all stdlib entries
- e.g. write "Lfo" and choose List.fold expansion
-- skeleton for langage keyword
- write "function", select the completion, then:
+- 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
- ...
-- integrated first step tutorial (write "TUTORIAL" and select the completion)
-# How to install from source
-Copy the content of the repo directory to a new Opa directory in
-mkdir -p ~/.config/sublime-text2/
-cp -R * ~/.config/sublime-text2/
+- You can also play with the (first) tutorial by typing "TUTORIAL" and selecting the completion.
-#How to build a package file
-1) Install AAAPackage Dev and Package Control (sublime package)
+# 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
- -select build system json to tmLanguage
- -F7
+ - Open the file
+ - Select build system json to tmLanguage
+ - F7
+3) Hit [ctrl+p -> "Package Control: Create Package File" -> "Opa"]
+4) You should have the plugin in Opa.sublime-package
+# Questions, contributions
-3) [ctrl+p -> "Package Control: Create Package File" -> "Opa"
+Please use github Issues, fork and contribute Pull Requests to make the Opa plugin rock as much as possible.
-4) You obtain a plugin named Opa.sublime-package

0 comments on commit 6d09904

Please sign in to comment.