Skip to content

Commit 475c2ee

Browse files
committed
Menus: added main package settings menu + settings and keymaps file.
1 parent 0a172eb commit 475c2ee

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

keymaps/Default.sublime-keymap

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
// Runs the whole test-suite.
3+
{ "keys": ["ctrl+alt+shift+t"], "command": "mix_test" },
4+
// Runs the current test file.
5+
{ "keys": ["ctrl+alt+t"], "command": "mix_test_file" },
6+
// Runs the current test file but including only the tests marked by the selected lines.
7+
{ "keys": ["alt+shift+t"], "command": "mix_test_selection" },
8+
// Runs the previously executed command.
9+
{ "keys": ["alt+shift+r"], "command": "mix_test_repeat" },
10+
// Formats the source file.
11+
{ "keys": ["alt+shift+f"], "command": "mix_format_file",
12+
"context": [ { "key": "selector", "operator": "equal", "operand": "source.elixir" } ]
13+
},
14+
]

menus/Main.sublime-menu

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[
2+
{
3+
"id": "preferences",
4+
"children": [
5+
{
6+
"caption": "Package Settings",
7+
"mnemonic": "P",
8+
"id": "package-settings",
9+
"children": [
10+
{
11+
"caption": "ElixirSyntax",
12+
"children": [
13+
{
14+
"caption": "README",
15+
"command": "open_file",
16+
"args": {
17+
"file": "${packages}/ElixirSyntax/README.md"
18+
}
19+
},
20+
{
21+
"caption": "CHANGELOG",
22+
"command": "open_file",
23+
"args": {
24+
"file": "${packages}/ElixirSyntax/CHANGELOG.md"
25+
}
26+
},
27+
{ "caption": "-" },
28+
{
29+
"caption": "Settings",
30+
"command": "edit_settings",
31+
"args": {
32+
"base_file": "${packages}/ElixirSyntax/settings/ElixirSyntax.sublime-settings",
33+
"default": "{\n $0\n}\n"
34+
}
35+
},
36+
{
37+
"caption": "Key Bindings",
38+
"command": "edit_settings",
39+
"args": {
40+
"base_file": "${packages}/ElixirSyntax/keymaps/Default.sublime-keymap",
41+
"default": "[\n $0\n]\n"
42+
}
43+
}
44+
]
45+
}
46+
]
47+
}
48+
]
49+
}
50+
]
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"mix_test": {
3+
// Which command to execute.
4+
"cmd": ["mix", "test"],
5+
// Choose where to display the cmd's output.
6+
// `{"values": ["tab", "panel", "file://..."]}`
7+
"output": "panel",
8+
// Output mode of the disk file to open/create.
9+
// `{"values": "see `open()` modifiers"}`
10+
"output_mode": "w",
11+
// Automatically scroll the output view every t seconds.
12+
// `{"values": [null, "positive float"]}`
13+
"output_scroll_time": 2,
14+
// Additional arguments to pass to `cmd`.
15+
// `{"values": "see `mix help test`"}`
16+
"args": [],
17+
// The seed with which to randomize the tests.
18+
// `{"values": [null, "positive integer"]}`
19+
"seed": null
20+
},
21+
"mix_format": {
22+
// Which command to execute.
23+
"cmd": ["mix", "format"],
24+
// Calls `mix format` automatically on saving the file if `true`.
25+
"on_save": false
26+
}
27+
}

0 commit comments

Comments
 (0)