Skip to content

Commit f5c3ad2

Browse files
committed
hefty reformatting of the syntax docs
1 parent 8637525 commit f5c3ad2

1 file changed

Lines changed: 42 additions & 18 deletions

File tree

doc/ft-ruby-syntax.txt

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

33
There are a number of options to the Ruby syntax highlighting.
44

5-
By default, the "end" keyword is colorized according to the opening statement
6-
of the block it closes. While useful, this feature can be expensive; if you
7-
experience slow redrawing (or you are on a terminal with poor color support)
8-
you may want to turn it off by defining the "ruby_no_expensive" variable: >
5+
1. Ruby operators |ruby_operators|
6+
2. Whitespace errors |ruby_space_errors|
7+
3. Folds |ruby_fold|
8+
4. Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
99

10-
:let ruby_no_expensive = 1
11-
<
12-
In this case the same color will be used for all control keywords.
1310

14-
If you do want this feature enabled, but notice highlighting errors while
15-
scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
16-
the "ruby_minlines" variable to a value larger than 50: >
11+
==============================================================================
12+
1. Ruby operators *ruby_operators*
1713

18-
:let ruby_minlines = 100
19-
<
20-
Ideally, this value should be a number of lines large enough to embrace your
21-
largest class or module.
14+
Ruby operators can be highlighted.
2215

23-
Ruby operators can be highlighted. This is enabled by defining
24-
"ruby_operators": >
16+
This is enabled by defining "ruby_operators": >
2517
2618
:let ruby_operators = 1
2719
<
20+
21+
==============================================================================
22+
2. Whitespace errors *ruby_space_errors*
23+
2824
Whitespace errors can be highlighted by defining "ruby_space_errors": >
2925
3026
:let ruby_space_errors = 1
3127
<
28+
3229
This will highlight trailing whitespace and tabs preceded by a space character
3330
as errors. This can be refined by defining "ruby_no_trail_space_error" and
3431
"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after
3532
spaces respectively.
3633

34+
==============================================================================
35+
3. Folds *ruby_fold*
36+
37+
Folds can be enabled by defining "ruby_fold": >
38+
3739
:let ruby_fold = 1
3840
<
41+
3942
This will set the value |foldmethod| to "syntax" locally to the current buffer
4043
or window, which will enable syntax-based folding when editing Ruby filetypes.
41-
>
44+
45+
==============================================================================
46+
4. Reducing expensive operations *ruby_no_expensive*
47+
48+
By default, the "end" keyword is colorized according to the opening statement
49+
of the block it closes. While useful, this feature can be expensive; if you
50+
experience slow redrawing (or you are on a terminal with poor color support)
51+
you may want to turn it off by defining the "ruby_no_expensive" variable: >
52+
53+
:let ruby_no_expensive = 1
54+
<
55+
In this case the same color will be used for all control keywords.
56+
57+
*ruby-minlines*
58+
If you do want this feature enabled, but notice highlighting errors while
59+
scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
60+
the "ruby_minlines" variable to a value larger than 50: >
61+
62+
:let ruby_minlines = 100
63+
<
64+
Ideally, this value should be a number of lines large enough to embrace your
65+
largest class or module.
4266

4367
vim:tw=78:sw=4:ts=8:ft=help:norl:

0 commit comments

Comments
 (0)