Skip to content

Commit 04fabcc

Browse files
committed
Syntax doc copy editing
This has been synced with the content in Vim's doc/syntax.txt.
1 parent 3cac995 commit 04fabcc

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

doc/ft-ruby-syntax.txt

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
1-
RUBY *ruby.vim* *ft-ruby-syntax*
1+
RUBY *ruby.vim* *ft-ruby-syntax*
22

3-
There are a number of options to the Ruby syntax highlighting.
3+
Ruby: Operator highlighting |ruby_operators|
4+
Ruby: Whitespace errors |ruby_space_errors|
5+
Ruby: Folding |ruby_fold| |ruby_foldable_groups|
6+
Ruby: Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
7+
Ruby: Spellchecking strings |ruby_spellcheck_strings|
48

5-
1. Ruby operators |ruby_operators|
6-
2. Whitespace errors |ruby_space_errors|
7-
3. Folds |ruby_fold|
8-
4. Foldable groups |ruby_foldable_groups|
9-
5. Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
9+
*ruby_operators*
10+
Ruby: Operator highlighting ~
1011

11-
12-
1. Ruby operators *ruby_operators*
13-
14-
Ruby operators can be highlighted.
15-
16-
This is enabled by defining "ruby_operators": >
12+
Operators can be highlighted by defining "ruby_operators": >
1713
1814
:let ruby_operators = 1
1915
<
20-
21-
2. Whitespace errors *ruby_space_errors*
16+
*ruby_space_errors*
17+
Ruby: Whitespace errors ~
2218

2319
Whitespace errors can be highlighted by defining "ruby_space_errors": >
2420
2521
:let ruby_space_errors = 1
2622
<
27-
2823
This will highlight trailing whitespace and tabs preceded by a space character
2924
as errors. This can be refined by defining "ruby_no_trail_space_error" and
3025
"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after
3126
spaces respectively.
3227

33-
3. Folds *ruby_fold*
28+
*ruby_fold* *ruby_foldable_groups*
29+
Ruby: Folding ~
3430

35-
Folds can be enabled by defining "ruby_fold": >
31+
Folding can be enabled by defining "ruby_fold": >
3632
3733
:let ruby_fold = 1
3834
<
35+
This will set the value of 'foldmethod' to "syntax" locally to the current
36+
buffer or window, which will enable syntax-based folding when editing Ruby
37+
filetypes.
3938

40-
This will set the value |foldmethod| to "syntax" locally to the current buffer
41-
or window, which will enable syntax-based folding when editing Ruby filetypes.
42-
43-
4. Foldable groups *ruby_foldable_groups*
44-
39+
*ruby_foldable_groups*
4540
Default folding is rather detailed, i.e., small syntax units like "if", "do",
4641
"%w[]" may create corresponding fold levels.
4742

@@ -73,7 +68,8 @@ The value is a space-separated list of keywords:
7368
<< Here documents
7469
__END__ Source code after "__END__" directive
7570

76-
5. Reducing expensive operations *ruby_no_expensive*
71+
*ruby_no_expensive*
72+
Ruby: Reducing expensive operations ~
7773

7874
By default, the "end" keyword is colorized according to the opening statement
7975
of the block it closes. While useful, this feature can be expensive; if you
@@ -95,9 +91,11 @@ the "ruby_minlines" variable to a value larger than 50: >
9591
Ideally, this value should be a number of lines large enough to embrace your
9692
largest class or module.
9793

98-
6. Spellchecking strings *ruby_spellcheck_strings*
94+
*ruby_spellcheck_strings*
95+
Ruby: Spellchecking strings ~
9996

100-
Ruby syntax will perform spellchecking of strings if you define "ruby_spellcheck_strings": >
97+
Ruby syntax will perform spellchecking of strings if you define
98+
"ruby_spellcheck_strings": >
10199
102100
:let ruby_spellcheck_strings = 1
103101
<

0 commit comments

Comments
 (0)