sublime_dsl 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +9 -0
- data/README.md +1 -1
- data/SYNTAX.md +13 -41
- data/lib/sublime_dsl.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1c6a39ce468da1206014f15be5c290a183a34f3
|
4
|
+
data.tar.gz: dc07f39837167615520084fbaf98f11d03b3fb89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b739dd4ebe8ed084ba450e24f7ced6b759af4bf6407445f5eaab825a8dfed6f6831d57325e411e2278587b161507ef5ac58cb388e2e44899f8210bb83be5a393
|
7
|
+
data.tar.gz: 59c5477cd3a1be0fb91976e22a4684f18725ebcaf54cc45c96bbded11746f0fba08ce0561664334a1a02bd04869c288b2867e4bac980da4c5fba16769e3b998a
|
data/HISTORY.md
ADDED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Once you have it, you wonder how you could do without it: all DSL statements
|
|
13
13
|
are regular method calls, so you can use the power of Ruby instead of copy/paste,
|
14
14
|
defining and calling your own methods.
|
15
15
|
|
16
|
-
Refer to SYNTAX.md for more information on the DSLs.
|
16
|
+
Refer to [SYNTAX](SYNTAX.md) for more information on the DSLs.
|
17
17
|
|
18
18
|
## Installation
|
19
19
|
|
data/SYNTAX.md
CHANGED
@@ -3,34 +3,6 @@ This preliminary documentation supposes you are familiar with the configuration
|
|
3
3
|
of TextMate (grammars, preferences, snippets and themes) and Sublime Text (commands,
|
4
4
|
keymaps, mousemaps, menus, settings).
|
5
5
|
|
6
|
-
## General Design
|
7
|
-
|
8
|
-
### Import: Converting to DSL
|
9
|
-
|
10
|
-
When importing a ST package, some files are grouped into one DSL file:
|
11
|
-
|
12
|
-
- all macros (*.sublime-macro) are grouped into macros.rb
|
13
|
-
- all snippets (*.sublime-snippet, *.tmSnippet) are grouped into snippets.rb
|
14
|
-
- all commands (*.sublime-commands) are grouped into commands.rb
|
15
|
-
- all preferences (*.tmPreferences) are grouped into preferences.rb
|
16
|
-
- all settings (*.sublime-settings) are grouped into settings.rb
|
17
|
-
|
18
|
-
Other files generate one DSL file:
|
19
|
-
|
20
|
-
- *.tmLanguage => *.tmLanguage.rb
|
21
|
-
- *.sublime-menu => *.menu.rb
|
22
|
-
- *.sublime-keymap => *.keymap.rb
|
23
|
-
- *.sublime-mousemap => *.mousemap.rb
|
24
|
-
|
25
|
-
Finally, files with an extension not listed above (e.g., *.py) are copied "as is".
|
26
|
-
In particular, there is no DSL (yet?) for *.sublime-build and *.sublime-completions.
|
27
|
-
|
28
|
-
### Export: Converting from DSL
|
29
|
-
|
30
|
-
The export processes all *.rb files located in the DSL directory, and copies
|
31
|
-
other files "as is". Therefore, the organization of DSL files is free: a whole
|
32
|
-
package can be specified into one source file, or into several source files.
|
33
|
-
|
34
6
|
## Grammars
|
35
7
|
|
36
8
|
Grammars are defined with the `language` method:
|
@@ -460,41 +432,41 @@ Example:
|
|
460
432
|
bind 'esc', single_selection
|
461
433
|
si num_selections != 1
|
462
434
|
bind 'esc', clear_fields
|
463
|
-
si has_next_field
|
464
|
-
ou has_prev_field
|
435
|
+
si has_next_field == true
|
436
|
+
ou has_prev_field == true
|
465
437
|
bind 'esc', hide_panel(cancel: true)
|
466
|
-
si panel_visible
|
438
|
+
si panel_visible == true
|
467
439
|
bind 'esc', hide_overlay
|
468
|
-
si overlay_visible
|
440
|
+
si overlay_visible == true
|
469
441
|
bind 'esc', hide_auto_complete
|
470
|
-
si auto_complete_visible
|
442
|
+
si auto_complete_visible == true
|
471
443
|
|
472
444
|
bind 'tab', insert_best_completion(default: "\t", exact: true)
|
473
445
|
bind 'tab', insert_best_completion(default: "\t", exact: false)
|
474
|
-
si setting.tab_completion
|
446
|
+
si setting.tab_completion == true
|
475
447
|
bind 'tab', replace_completion_with_next_completion
|
476
|
-
si last_command
|
477
|
-
et setting.tab_completion
|
448
|
+
si last_command == "insert_best_completion"
|
449
|
+
et setting.tab_completion == true
|
478
450
|
bind 'tab', reindent
|
479
|
-
si setting.auto_indent
|
480
|
-
et all.selection_empty
|
451
|
+
si setting.auto_indent == true
|
452
|
+
et all.selection_empty == true
|
481
453
|
et all.preceding_text =~ /\A\z/
|
482
454
|
et all.following_text =~ /\A\z/
|
483
455
|
bind 'tab', indent
|
484
456
|
si text =~ /\n/
|
485
457
|
bind 'tab', next_field
|
486
|
-
si has_next_field
|
458
|
+
si has_next_field == true
|
487
459
|
bind 'tab', commit_completion
|
488
460
|
si auto_complete_visible
|
489
461
|
et setting.auto_complete_commit_on_tab
|
490
462
|
|
491
463
|
bind 'shift+tab', insert(characters: "\t")
|
492
464
|
bind 'shift+tab', unindent
|
493
|
-
si setting.shift_tab_unindent
|
465
|
+
si setting.shift_tab_unindent == true
|
494
466
|
ou preceding_text =~ /\A[\t ]*\z/
|
495
467
|
ou text =~ /\n/
|
496
468
|
bind 'shift+tab', prev_field
|
497
|
-
si has_prev_field
|
469
|
+
si has_prev_field == true
|
498
470
|
|
499
471
|
end
|
500
472
|
```
|
data/lib/sublime_dsl.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sublime_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thierry Lambert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -63,7 +63,9 @@ extensions: []
|
|
63
63
|
extra_rdoc_files:
|
64
64
|
- README.md
|
65
65
|
- SYNTAX.md
|
66
|
+
- HISTORY.md
|
66
67
|
files:
|
68
|
+
- HISTORY.md
|
67
69
|
- README.md
|
68
70
|
- Rakefile
|
69
71
|
- SYNTAX.md
|