Skip to content

Commit

Permalink
[feature] run option
Browse files Browse the repository at this point in the history
run the default exe with -p 2000 option
  • Loading branch information
OpaOnWindowsNow committed Mar 7, 2012
1 parent 3d86268 commit 6bc5987
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Default.sublime-keymap
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[
{ "keys": ["ctrl+d"], "command": "goto_opa_doc" }
{ "keys": ["ctrl+d"], "command": "goto_opa_doc" },
{ "keys": ["f8"], "command": "run_opa_build" },
{ "keys": ["f9"], "command": "stop_run_opa_build" }

]
3 changes: 2 additions & 1 deletion Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"children":
[
{ "caption": "Build" , "command": "build" },
{ "caption": "Run" , "command": "Disabled"},
{ "caption": "Run" , "command": "run_opa_build"},
{ "caption": "Stop" , "command": "stop_run_opa_build"},
{ "caption": "Run (no rebuild)" , "command": "Disabled"},
{ "caption": "Monitor" , "command": "Disabled"}
]
Expand Down
2 changes: 1 addition & 1 deletion Opa-All.sublime-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cmd": ["opa --no-color *.opa"],
"cmd": ["opa --no-color *.opa -o opa_build.exe"],
"file_regex": "^(?:File|In)[^ ]*[ ]+[\"]?([^\"[]+[.]opa)[\"]?[^[(]*[[(]([0-9]+):([0-9]+)-[0-9]+:([0-9]+)[^)].*$",
"working_dir": "${project_path:${folder}}",
"selector": "source.opa",
Expand Down
2 changes: 1 addition & 1 deletion Opa-One.sublime-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cmd": ["opa --no-color ", "$file"],
"cmd": ["opa --no-color $file -o opa_build.exe"],
"file_regex": "^(?:File|In)[^ ]*[ ]+[\"]?([^\"[]+[.]opa)[\"]?[^[(]*[[(]([0-9]+):([0-9]+)-[0-9]+:([0-9]+).*",
"working_dir": "${project_path:${folder}}",
"selector": "source.opa",
Expand Down
12 changes: 7 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,25 @@ Choose a build system.
or
[Tools -> Build -> Build Sytem -> Opa-One]

Then press F7 or go in menu [Toos -> Opa -> Build].
Then press F7 or go in menu [Tools -> Opa -> Build].

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.

Press F4 to naviguate in compilation error, if any.


# How to build with classic syntax ?

Edit Opa-All.sublime-build or Opa-One.sublime-build, and add "--parser classic" in the cmd field just after opa.
Edit Opa-XXX.sublime-build, and add "--parser classic" in the cmd field just after opa.


# How to run ?

You have to do it manually for now.
Go in the same directory as the sources, the .exe should be there.
Or alternatively, add "--" at the end of the cmd field of subime-build files (see previous question)
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.


# What else ?
Expand Down

0 comments on commit 6bc5987

Please sign in to comment.