rubybuntu-gedit 11.08.18
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +20 -0
- data/Rakefile +28 -0
- data/bin/rubybuntu-gedit +88 -0
- data/data/language-specs/README.rdoc +73 -0
- data/data/language-specs/erb.lang +53 -0
- data/data/language-specs/html-erb.lang +48 -0
- data/data/language-specs/javascript-erb.lang +23 -0
- data/data/language-specs/ruby-bundler-gemfile-lock.lang +101 -0
- data/data/language-specs/ruby-erb.lang +22 -0
- data/data/language-specs/ruby.lang +1068 -0
- data/data/language-specs/ruby.lang-extras/important-constants.rb +7 -0
- data/data/language-specs/ruby.lang-extras/important-methods.rb +3 -0
- data/data/language-specs/ruby.lang-extras/known-bugs.rb +11 -0
- data/data/language-specs/xml-erb.lang +22 -0
- data/data/language-specs/yml-erb.lang +21 -0
- data/data/mime/README.rdoc +17 -0
- data/data/mime/cucumber.xml +9 -0
- data/data/mime/haml.xml +8 -0
- data/data/mime/ruby-builder.xml +9 -0
- data/data/mime/ruby-bundler.xml +13 -0
- data/data/mime/ruby-capistrano.xml +9 -0
- data/data/mime/ruby-erb.xml +62 -0
- data/data/mime/ruby-rack.xml +8 -0
- data/data/mime/ruby-rake.xml +10 -0
- data/data/mime/ruby-thor.xml +10 -0
- data/data/mime/ruby.xml +13 -0
- data/data/mime/sass.xml +14 -0
- data/data/mime/slim.xml +8 -0
- data/data/snippets/MIT-LICENSE +20 -0
- data/data/snippets/README.textile +108 -0
- data/data/snippets/TODO +6 -0
- data/data/snippets/cheatsheet.html +1602 -0
- data/data/snippets/doc/Gemfile +6 -0
- data/data/snippets/doc/Gemfile.lock +16 -0
- data/data/snippets/doc/create_documentation.rb +56 -0
- data/data/snippets/doc/documentation_stylesheet.sass +100 -0
- data/data/snippets/doc/documentation_stylesheet_print.sass +93 -0
- data/data/snippets/doc/documentation_template.haml +36 -0
- data/data/snippets/doc/gedit-snippets-logo.png +0 -0
- data/data/snippets/doc/gedit-snippets-logo.svg +626 -0
- data/data/snippets/doc/method_parser.rb +24 -0
- data/data/snippets/erb.xml +84 -0
- data/data/snippets/html-erb.xml +84 -0
- data/data/snippets/javascript-erb.xml +84 -0
- data/data/snippets/rails_activerecord_associations.xml +34 -0
- data/data/snippets/rails_activerecord_basic.xml +11 -0
- data/data/snippets/rails_activerecord_validations.xml +210 -0
- data/data/snippets/rails_controllers_basic.xml +19 -0
- data/data/snippets/rhtml_basic.xml +70 -0
- data/data/snippets/rhtml_forms.xml +75 -0
- data/data/snippets/rhtml_html.xml +98 -0
- data/data/snippets/ruby-erb.xml +84 -0
- data/data/snippets/ruby_basic.xml +142 -0
- data/data/snippets/ruby_collections.xml +163 -0
- data/data/snippets/shoulda_actioncontroller.xml +73 -0
- data/data/snippets/shoulda_activerecord.xml +127 -0
- data/data/snippets/shoulda_basic.xml +22 -0
- data/data/snippets/snippet_tools.xml +32 -0
- data/data/snippets/xml-erb.xml +84 -0
- data/data/snippets/yml-erb.xml +84 -0
- data/data/styles/README.rdoc +17 -0
- data/data/styles/rubybuntu1.xml +119 -0
- data/rubybuntu-gedit.gemspec +26 -0
- metadata +125 -0
@@ -0,0 +1,163 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<snippets language="ruby">
|
3
|
+
<!-- Hash assist -->
|
4
|
+
<snippet>
|
5
|
+
<text><![CDATA[:${1:key} => ${2:"value"}$0]]></text>
|
6
|
+
<tag>:</tag>
|
7
|
+
<description>:key => "value" - hash pair</description>
|
8
|
+
</snippet>
|
9
|
+
<snippet>
|
10
|
+
<text><![CDATA[ => ]]></text>
|
11
|
+
<description>hash rocket</description>
|
12
|
+
<accelerator><![CDATA[<Shift><Alt>l]]></accelerator>
|
13
|
+
</snippet>
|
14
|
+
|
15
|
+
|
16
|
+
<!-- Collect method -->
|
17
|
+
<snippet>
|
18
|
+
<text><![CDATA[collect { |${1:element}| ${1:element}.$0 }]]></text>
|
19
|
+
<tag>collect</tag>
|
20
|
+
<description>collect element</description>
|
21
|
+
</snippet>
|
22
|
+
<snippet>
|
23
|
+
<text><![CDATA[collect do |${1:element}|
|
24
|
+
${1:element}.$0
|
25
|
+
end]]></text>
|
26
|
+
<tag>collecto</tag>
|
27
|
+
<description>collect element do</description>
|
28
|
+
</snippet>
|
29
|
+
|
30
|
+
<!-- Each -->
|
31
|
+
<snippet>
|
32
|
+
<text><![CDATA[each { |${1:element}| ${1:element}.$0 }]]></text>
|
33
|
+
<tag>each</tag>
|
34
|
+
<description>each element</description>
|
35
|
+
</snippet>
|
36
|
+
<snippet>
|
37
|
+
<text><![CDATA[each do |${1:element}|
|
38
|
+
${1:element}.$0
|
39
|
+
end]]></text>
|
40
|
+
<tag>eacho</tag>
|
41
|
+
<description>each element do</description>
|
42
|
+
</snippet>
|
43
|
+
<snippet>
|
44
|
+
<text><![CDATA[each_with_index { |${1:element}, ${2:idx}| ${1:element}.$0 }]]></text>
|
45
|
+
<tag>ewi</tag>
|
46
|
+
<description>each_with_index</description>
|
47
|
+
</snippet>
|
48
|
+
<snippet>
|
49
|
+
<text><![CDATA[each_with_index do |${1:element}, ${2:idx}|
|
50
|
+
${1:element}.$0
|
51
|
+
end]]></text>
|
52
|
+
<tag>ewio</tag>
|
53
|
+
<description>each_with_index do</description>
|
54
|
+
</snippet>
|
55
|
+
|
56
|
+
<!-- For in -->
|
57
|
+
<snippet>
|
58
|
+
<text><![CDATA[for ${1:element} in ${2:collection}
|
59
|
+
${1:element}.$0
|
60
|
+
end]]></text>
|
61
|
+
<tag>forin</tag>
|
62
|
+
<description>for .. in .. end</description>
|
63
|
+
</snippet>
|
64
|
+
|
65
|
+
<!-- Inject -->
|
66
|
+
<snippet>
|
67
|
+
<text><![CDATA[inject(${1:object}) { |${2:injection}, ${3:element}| $0 }]]></text>
|
68
|
+
<tag>inject</tag>
|
69
|
+
<description>inject object</description>
|
70
|
+
</snippet>
|
71
|
+
<snippet>
|
72
|
+
<text><![CDATA[inject(${1:object}) do |${2:injection}, ${3:element}|
|
73
|
+
$0
|
74
|
+
end]]></text>
|
75
|
+
<tag>injecto</tag>
|
76
|
+
<description>inject object do</description>
|
77
|
+
</snippet>
|
78
|
+
|
79
|
+
<!-- Reject -->
|
80
|
+
<snippet>
|
81
|
+
<text><![CDATA[reject { |${1:element}| ${1:element}.$0 }]]></text>
|
82
|
+
<tag>reject</tag>
|
83
|
+
<description>reject element</description>
|
84
|
+
</snippet>
|
85
|
+
<snippet>
|
86
|
+
<text><![CDATA[reject do |${1:element}|
|
87
|
+
${1:element}.$0
|
88
|
+
end]]></text>
|
89
|
+
<tag>rejecto</tag>
|
90
|
+
<description>reject element do</description>
|
91
|
+
</snippet>
|
92
|
+
|
93
|
+
<!-- Select -->
|
94
|
+
<snippet>
|
95
|
+
<text><![CDATA[select { |${1:element}| ${1:element}.$0 }]]></text>
|
96
|
+
<tag>select</tag>
|
97
|
+
<description>select element</description>
|
98
|
+
</snippet>
|
99
|
+
<snippet>
|
100
|
+
<text><![CDATA[select do |${1:element}|
|
101
|
+
${1:element}.$0
|
102
|
+
end]]></text>
|
103
|
+
<tag>selecto</tag>
|
104
|
+
<description>select element do</description>
|
105
|
+
</snippet>
|
106
|
+
|
107
|
+
<!-- Find all -->
|
108
|
+
<snippet>
|
109
|
+
<text><![CDATA[find_all { |${1:element}| ${1:element}.$0 }]]></text>
|
110
|
+
<tag>fa</tag>
|
111
|
+
<description>find_all elements</description>
|
112
|
+
</snippet>
|
113
|
+
<snippet>
|
114
|
+
<text><![CDATA[find_all do |${1:element}|
|
115
|
+
${1:element}.$0
|
116
|
+
end]]></text>
|
117
|
+
<tag>fao</tag>
|
118
|
+
<description>find_all elements do</description>
|
119
|
+
</snippet>
|
120
|
+
|
121
|
+
<!-- Any? -->
|
122
|
+
<snippet>
|
123
|
+
<text><![CDATA[any? { |${1:element}| ${1:element}.$0 }]]></text>
|
124
|
+
<tag>any</tag>
|
125
|
+
<description>any element</description>
|
126
|
+
</snippet>
|
127
|
+
<snippet>
|
128
|
+
<text><![CDATA[any? do |${1:element}|
|
129
|
+
${1:element}.$0
|
130
|
+
end]]></text>
|
131
|
+
<tag>anyo</tag>
|
132
|
+
<description>any element do</description>
|
133
|
+
</snippet>
|
134
|
+
|
135
|
+
<!-- All? -->
|
136
|
+
<snippet>
|
137
|
+
<text><![CDATA[all? { |${1:element}| ${1:element}.$0 }]]></text>
|
138
|
+
<tag>all</tag>
|
139
|
+
<description>all elements?</description>
|
140
|
+
</snippet>
|
141
|
+
<snippet>
|
142
|
+
<text><![CDATA[all? do |${1:element}|
|
143
|
+
${1:element}.$0
|
144
|
+
end]]></text>
|
145
|
+
<tag>allo</tag>
|
146
|
+
<description>all elements? do</description>
|
147
|
+
</snippet>
|
148
|
+
|
149
|
+
<!-- Map -->
|
150
|
+
<snippet>
|
151
|
+
<text><![CDATA[map { |${1:element}| ${1:element}.$0 }]]></text>
|
152
|
+
<tag>map</tag>
|
153
|
+
<description>map elements</description>
|
154
|
+
</snippet>
|
155
|
+
<snippet>
|
156
|
+
<text><![CDATA[map do |${1:element}|
|
157
|
+
${1:element}.$0
|
158
|
+
end]]></text>
|
159
|
+
<tag>mapo</tag>
|
160
|
+
<description>map elements do</description>
|
161
|
+
</snippet>
|
162
|
+
|
163
|
+
</snippets>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<!--
|
3
|
+
Basic snippets for shoulda ruby testing framework actioncontroller macros
|
4
|
+
http://dev.thoughtbot.com/shoulda/
|
5
|
+
-->
|
6
|
+
<snippets language="ruby">
|
7
|
+
<snippet>
|
8
|
+
<text><![CDATA[should_assign_to ${1:attribute}$0]]></text>
|
9
|
+
<tag>sat</tag>
|
10
|
+
<description>should_assign_to ...</description>
|
11
|
+
</snippet>
|
12
|
+
<snippet>
|
13
|
+
<text><![CDATA[should_filter_params ${1:attribute}$0]]></text>
|
14
|
+
<tag>sfp</tag>
|
15
|
+
<description>should_filter_params ...</description>
|
16
|
+
</snippet>
|
17
|
+
<snippet>
|
18
|
+
<text><![CDATA[should_not_assign_to ${1:attribute}$0]]></text>
|
19
|
+
<tag>snat</tag>
|
20
|
+
<description>should_not_assign_to ...</description>
|
21
|
+
</snippet>
|
22
|
+
<snippet>
|
23
|
+
<text><![CDATA[should_not_set_the_flash$0]]></text>
|
24
|
+
<tag>snstf</tag>
|
25
|
+
<description>should_not_set_the_flash</description>
|
26
|
+
</snippet>
|
27
|
+
<snippet>
|
28
|
+
<text><![CDATA[should_redirect_to('${1:description}') { $0 }]]></text>
|
29
|
+
<tag>srt</tag>
|
30
|
+
<description>should_redirect_to ...</description>
|
31
|
+
</snippet>
|
32
|
+
<snippet>
|
33
|
+
<text><![CDATA[should_render_template ${1:template}$0]]></text>
|
34
|
+
<tag>srt</tag>
|
35
|
+
<description>should_render_template ...</description>
|
36
|
+
</snippet>
|
37
|
+
<snippet>
|
38
|
+
<text><![CDATA[should_render_with_layout ${1:layout}$0]]></text>
|
39
|
+
<tag>srwl</tag>
|
40
|
+
<description>should_render_with_layout ...</description>
|
41
|
+
</snippet>
|
42
|
+
<snippet>
|
43
|
+
<text><![CDATA[should_render_without_layout ${1:layout}$0]]></text>
|
44
|
+
<tag>srwl</tag>
|
45
|
+
<description>should_render_without_layout ...</description>
|
46
|
+
</snippet>
|
47
|
+
<snippet>
|
48
|
+
<text><![CDATA[should_respond_with ${1:status}$0]]></text>
|
49
|
+
<tag>srw</tag>
|
50
|
+
<description>should_respond_with ...</description>
|
51
|
+
</snippet>
|
52
|
+
<snippet>
|
53
|
+
<text><![CDATA[should_respond_with_content_type ${1:content_type_or_regexp}$0]]></text>
|
54
|
+
<tag>srwct</tag>
|
55
|
+
<description>should_respond_with_content_type ...</description>
|
56
|
+
</snippet>
|
57
|
+
<snippet>
|
58
|
+
<text><![CDATA[should_route :${1:get}, "${$2:path}", $0]]></text>
|
59
|
+
<tag>sr</tag>
|
60
|
+
<description>should_route ...</description>
|
61
|
+
</snippet>
|
62
|
+
<snippet>
|
63
|
+
<text><![CDATA[should_set_session('${1:key}') { $0 }]]></text>
|
64
|
+
<tag>sss</tag>
|
65
|
+
<description>should_set_session ...</description>
|
66
|
+
</snippet>
|
67
|
+
<snippet>
|
68
|
+
<text><![CDATA[should_set_the_flash_to ${1:string_or_regexp}$0]]></text>
|
69
|
+
<tag>sstft</tag>
|
70
|
+
<description>should_set_the_flash_to ...</description>
|
71
|
+
</snippet>
|
72
|
+
|
73
|
+
</snippets>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<!--
|
3
|
+
Basic snippets for shoulda ruby testing framework activerecord macros
|
4
|
+
http://dev.thoughtbot.com/shoulda/
|
5
|
+
-->
|
6
|
+
<snippets language="ruby">
|
7
|
+
<!--
|
8
|
+
General test macros
|
9
|
+
-->
|
10
|
+
<snippet>
|
11
|
+
<text><![CDATA[should_allow_mass_assignment_of :${1:attributes}$0]]></text>
|
12
|
+
<tag>samao</tag>
|
13
|
+
<description>should_allow_mass_assignment_of ...</description>
|
14
|
+
</snippet>
|
15
|
+
<snippet>
|
16
|
+
<text><![CDATA[should_not_allow_mass_assignment_of :${1:attributes}$0]]></text>
|
17
|
+
<tag>snamao</tag>
|
18
|
+
<description>should_not_allow_mass_assignment_of ...</description>
|
19
|
+
</snippet>
|
20
|
+
<snippet>
|
21
|
+
<text><![CDATA[should_have_class_methods :${1:attributes}$0]]></text>
|
22
|
+
<tag>shcm</tag>
|
23
|
+
<description>should_have_class_methods ...</description>
|
24
|
+
</snippet>
|
25
|
+
<snippet>
|
26
|
+
<text><![CDATA[should_have_instance_methods :${1:attributes}$0]]></text>
|
27
|
+
<tag>shim</tag>
|
28
|
+
<description>should_have_instance_methods ...</description>
|
29
|
+
</snippet>
|
30
|
+
<snippet>
|
31
|
+
<text><![CDATA[should_have_db_columns :${1:attributes}$0]]></text>
|
32
|
+
<tag>shdc</tag>
|
33
|
+
<description>should_have_db_columns ...</description>
|
34
|
+
</snippet>
|
35
|
+
<snippet>
|
36
|
+
<text><![CDATA[should_have_index :${1:attributes}$0]]></text>
|
37
|
+
<tag>shi</tag>
|
38
|
+
<description>should_have_index ...</description>
|
39
|
+
</snippet>
|
40
|
+
<snippet>
|
41
|
+
<text><![CDATA[should_have_named_scope :${1:scope_call}, $0]]></text>
|
42
|
+
<tag>shns</tag>
|
43
|
+
<description>should_have_named_scope ...</description>
|
44
|
+
</snippet>
|
45
|
+
<snippet>
|
46
|
+
<text><![CDATA[should_have_readonly_methods :${1:attributes}$0]]></text>
|
47
|
+
<tag>shrm</tag>
|
48
|
+
<description>should_have_readonly_methods ...</description>
|
49
|
+
</snippet>
|
50
|
+
<!--
|
51
|
+
Association test macros
|
52
|
+
-->
|
53
|
+
<snippet>
|
54
|
+
<text><![CDATA[should_belong_to :${1:associations}$0]]></text>
|
55
|
+
<tag>sbt</tag>
|
56
|
+
<description>should_belong_to ...</description>
|
57
|
+
</snippet>
|
58
|
+
<snippet>
|
59
|
+
<text><![CDATA[should_have_many :${1:associations}$0]]></text>
|
60
|
+
<tag>shm</tag>
|
61
|
+
<description>should_have_many ...</description>
|
62
|
+
</snippet>
|
63
|
+
<snippet>
|
64
|
+
<text><![CDATA[should_have_one :${1:associations}$0]]></text>
|
65
|
+
<tag>sho</tag>
|
66
|
+
<description>should_have_one ...</description>
|
67
|
+
</snippet>
|
68
|
+
<snippet>
|
69
|
+
<text><![CDATA[should_have_and_belong_to_many :${1:associations}$0]]></text>
|
70
|
+
<tag>shabtm</tag>
|
71
|
+
<description>should_have_and_belong_to_many ...</description>
|
72
|
+
</snippet>
|
73
|
+
|
74
|
+
<!--
|
75
|
+
Validation test macros
|
76
|
+
-->
|
77
|
+
<snippet>
|
78
|
+
<text><![CDATA[should_allow_values_for :${1:attribute}, ${2:values}$0]]></text>
|
79
|
+
<tag>savf</tag>
|
80
|
+
<description>should_allow_values_for ...</description>
|
81
|
+
</snippet>
|
82
|
+
<snippet>
|
83
|
+
<text><![CDATA[should_not_allow_values_for :${1:attribute}, ${2:values}$0]]></text>
|
84
|
+
<tag>snavf</tag>
|
85
|
+
<description>should_not_allow_values_for ...</description>
|
86
|
+
</snippet>
|
87
|
+
<snippet>
|
88
|
+
<text><![CDATA[should_ensure_length_at_least :${1:attribute}, ${2:minimum_length}$0]]></text>
|
89
|
+
<tag>selal</tag>
|
90
|
+
<description>should_ensure_length_at_least ...</description>
|
91
|
+
</snippet>
|
92
|
+
<snippet>
|
93
|
+
<text><![CDATA[should_ensure_length_in_range :${1:attribute}, (${2:minimum_length}..${3:maximum_length})$0]]></text>
|
94
|
+
<tag>selir</tag>
|
95
|
+
<description>should_ensure_length_in_range ...</description>
|
96
|
+
</snippet>
|
97
|
+
<snippet>
|
98
|
+
<text><![CDATA[should_ensure_length_is :${1:attribute}, ${2:length}$0]]></text>
|
99
|
+
<tag>seli</tag>
|
100
|
+
<description>should_ensure_length_is ...</description>
|
101
|
+
</snippet>
|
102
|
+
<snippet>
|
103
|
+
<text><![CDATA[should_ensure_value_in_range :${1:attribute}, (${2:minimum_length}..${3:maximum_length})$0]]></text>
|
104
|
+
<tag>sevir</tag>
|
105
|
+
<description>should_ensure_value_in_range ...</description>
|
106
|
+
</snippet>
|
107
|
+
<snippet>
|
108
|
+
<text><![CDATA[should_validate_acceptance_of :${1:attributes}$0]]></text>
|
109
|
+
<tag>svao</tag>
|
110
|
+
<description>should_validate_acceptance_of ...</description>
|
111
|
+
</snippet>
|
112
|
+
<snippet>
|
113
|
+
<text><![CDATA[should_validate_numericality_of :${1:attributes}$0]]></text>
|
114
|
+
<tag>svno</tag>
|
115
|
+
<description>should_validate_numericality_of ...</description>
|
116
|
+
</snippet>
|
117
|
+
<snippet>
|
118
|
+
<text><![CDATA[should_validate_presence_of :${1:attributes}$0]]></text>
|
119
|
+
<tag>svpo</tag>
|
120
|
+
<description>should_validate_presence_of ...</description>
|
121
|
+
</snippet>
|
122
|
+
<snippet>
|
123
|
+
<text><![CDATA[should_validate_uniqueness_of :${1:attributes}, :scoped_to => ${2:field to scope uniq check}$0]]></text>
|
124
|
+
<tag>svuo</tag>
|
125
|
+
<description>should_validate_uniqueness_of ...</description>
|
126
|
+
</snippet>
|
127
|
+
</snippets>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<!--
|
3
|
+
Basic snippets for shoulda ruby testing framework
|
4
|
+
http://dev.thoughtbot.com/shoulda/
|
5
|
+
-->
|
6
|
+
<snippets language="ruby">
|
7
|
+
<snippet>
|
8
|
+
<text><![CDATA[context "${1:Name}" do
|
9
|
+
$0
|
10
|
+
end]]></text>
|
11
|
+
<tag>context</tag>
|
12
|
+
<description>context "xyz" do ... end</description>
|
13
|
+
</snippet>
|
14
|
+
|
15
|
+
<snippet>
|
16
|
+
<text><![CDATA[setup do
|
17
|
+
$0
|
18
|
+
end]]></text>
|
19
|
+
<tag>setup</tag>
|
20
|
+
<description>setup do ... end</description>
|
21
|
+
</snippet>
|
22
|
+
</snippets>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<snippets language="xml">
|
3
|
+
<snippet>
|
4
|
+
<text><![CDATA[<snippet>
|
5
|
+
<text><![CDATA[$1]]]]><![CDATA[></text>
|
6
|
+
<tag>$2</tag>
|
7
|
+
<description>$3</description>
|
8
|
+
</snippet>$0]]></text>
|
9
|
+
<tag>snip</tag>
|
10
|
+
<description>New snippet</description>
|
11
|
+
</snippet>
|
12
|
+
<snippet>
|
13
|
+
<text><![CDATA[<?xml version='1.0' encoding='utf-8'?>
|
14
|
+
<snippets language="${1:ruby}">
|
15
|
+
$0
|
16
|
+
</snippets>]]></text>
|
17
|
+
<tag>snippets</tag>
|
18
|
+
<description>New snippet</description>
|
19
|
+
</snippet>
|
20
|
+
<snippet>
|
21
|
+
<text><![CDATA[<!-- $1 -->$0]]></text>
|
22
|
+
<tag>c</tag>
|
23
|
+
<description>Short Comment</description>
|
24
|
+
</snippet>
|
25
|
+
<snippet>
|
26
|
+
<text><![CDATA[<!--
|
27
|
+
$1
|
28
|
+
-->$0]]></text>
|
29
|
+
<tag>lc</tag>
|
30
|
+
<description>Long comment</description>
|
31
|
+
</snippet>
|
32
|
+
</snippets>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
2
|
+
<!--
|
3
|
+
RHTML Ruby code snippets
|
4
|
+
-->
|
5
|
+
<snippets language="xml-erb">
|
6
|
+
<!--
|
7
|
+
ERb Tags
|
8
|
+
-->
|
9
|
+
<snippet>
|
10
|
+
<text><![CDATA[<%= $0 %>]]></text>
|
11
|
+
<tag>=</tag>
|
12
|
+
<description><%= block result %></description>
|
13
|
+
</snippet>
|
14
|
+
<snippet>
|
15
|
+
<text><![CDATA[<% $0 -%>]]></text>
|
16
|
+
<tag>%</tag>
|
17
|
+
<description><% ruby code block %></description>
|
18
|
+
</snippet>
|
19
|
+
|
20
|
+
<!--
|
21
|
+
Blocks
|
22
|
+
-->
|
23
|
+
<snippet>
|
24
|
+
<text><![CDATA[do
|
25
|
+
$0
|
26
|
+
end]]></text>
|
27
|
+
<tag>do</tag>
|
28
|
+
<description>do .. end</description>
|
29
|
+
</snippet>
|
30
|
+
<snippet>
|
31
|
+
<text><![CDATA[do |${1:object}|
|
32
|
+
$0
|
33
|
+
end]]></text>
|
34
|
+
<tag>doo</tag>
|
35
|
+
<description>do |object| .. end</description>
|
36
|
+
</snippet>
|
37
|
+
|
38
|
+
<!--
|
39
|
+
Collection iterators
|
40
|
+
-->
|
41
|
+
<snippet>
|
42
|
+
<text><![CDATA[<% ${1:@list}.each do |${2:item}| do %>
|
43
|
+
$0
|
44
|
+
<% end %>]]></text>
|
45
|
+
<tag>eacho</tag>
|
46
|
+
<description>each do item</description>
|
47
|
+
</snippet>
|
48
|
+
<snippet>
|
49
|
+
<text><![CDATA[<%= for ${1:element} in ${2:collection}
|
50
|
+
${1:element}.$0
|
51
|
+
end %>]]></text>
|
52
|
+
<tag>forin</tag>
|
53
|
+
<description>for .. in .. end</description>
|
54
|
+
</snippet>
|
55
|
+
|
56
|
+
<!--
|
57
|
+
Conditions
|
58
|
+
-->
|
59
|
+
<snippet>
|
60
|
+
<text><![CDATA[<% if ${1:logged_in?} %>
|
61
|
+
$0
|
62
|
+
<% end %>]]></text>
|
63
|
+
<tag>if</tag>
|
64
|
+
<description>if statement</description>
|
65
|
+
</snippet>
|
66
|
+
<snippet>
|
67
|
+
<text><![CDATA[<% if ${1:logged_in?} %>
|
68
|
+
$0
|
69
|
+
<% else %>
|
70
|
+
|
71
|
+
<% end %>]]></text>
|
72
|
+
<tag>ife</tag>
|
73
|
+
<description>if ... else ... end</description>
|
74
|
+
</snippet>
|
75
|
+
|
76
|
+
<!--
|
77
|
+
Uncategorized
|
78
|
+
-->
|
79
|
+
<snippet>
|
80
|
+
<text><![CDATA[<% end %>]]></text>
|
81
|
+
<tag>end</tag>
|
82
|
+
<description>end tag</description>
|
83
|
+
</snippet>
|
84
|
+
</snippets>
|