|
1 | | -RUBY *ruby.vim* *ruby-syntax* |
| 1 | +RUBY *ruby.vim* *ruby-syntax* |
2 | 2 |
|
3 | 3 | There are a number of options to the Ruby syntax highlighting. |
4 | 4 |
|
5 | 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 |
| 6 | +of the block it closes. While useful, this feature can be expensive; if you |
7 | 7 | experience slow redrawing (or you are on a terminal with poor color support) |
8 | 8 | you may want to turn it off by defining the "ruby_no_expensive" variable: > |
9 | 9 |
|
10 | | - :let ruby_no_expensive = 1 |
| 10 | + :let ruby_no_expensive = 1 |
11 | 11 |
|
12 | 12 | In this case the same color will be used for all control keywords. |
13 | 13 |
|
14 | 14 | If you do want this feature enabled, but notice highlighting errors while |
15 | 15 | scrolling backwards, which are fixed when redrawing with CTRL-L, try setting |
16 | 16 | the "ruby_minlines" variable to a value larger than 50: > |
17 | 17 |
|
18 | | - :let ruby_minlines = 100 |
| 18 | + :let ruby_minlines = 100 |
19 | 19 |
|
20 | 20 | Ideally, this value should be a number of lines large enough to embrace your |
21 | 21 | largest class or module. |
22 | 22 |
|
23 | 23 | Highlighting of special identifiers can be disabled by defining |
24 | 24 | "ruby_no_identifiers": > |
25 | 25 |
|
26 | | - :let ruby_no_identifiers = 1 |
| 26 | + :let ruby_no_identifiers = 1 |
27 | 27 |
|
28 | 28 | This will prevent highlighting of special identifiers like "ConstantName", |
29 | | -"$global_var", "@@class_var", "@instance_var", "| iterator |", and ":symbol". |
| 29 | +"$global_var", "@@class_var", "@instance_var", "| block_param |", and |
| 30 | +":symbol". |
30 | 31 |
|
31 | | -Significant methods of Class, Object, Module and Kernel are highlighted by |
32 | | -default. This can be disabled by defining "ruby_no_special_methods": > |
| 32 | +Significant methods of Kernel, Module and Object are highlighted by default. |
| 33 | +This can be disabled by defining "ruby_no_special_methods": > |
33 | 34 |
|
34 | | - :let ruby_no_special_methods = 1 |
| 35 | + :let ruby_no_special_methods = 1 |
35 | 36 |
|
36 | | -This will prevent highlighting of special methods such as "require", |
| 37 | +This will prevent highlighting of important methods such as "require", "attr", |
37 | 38 | "private", "raise" and "proc". |
38 | 39 |
|
39 | 40 | Whitespace errors can be highlighted by defining "ruby_space_errors": > |
40 | 41 |
|
41 | | - :let ruby_space_errors = 1 |
| 42 | + :let ruby_space_errors = 1 |
42 | 43 |
|
43 | 44 | This will highlight trailing whitespace and tabs preceded by a space character |
44 | | -as errors. This can be refined by defining "ruby_no_trail_space_error" and |
| 45 | +as errors. This can be refined by defining "ruby_no_trail_space_error" and |
45 | 46 | "ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after |
46 | 47 | spaces respectively. |
47 | 48 |
|
48 | 49 | Folding can be enabled by defining "ruby_fold": > |
49 | 50 |
|
50 | | - :let ruby_fold = 1 |
| 51 | + :let ruby_fold = 1 |
51 | 52 |
|
52 | 53 | This will set the 'foldmethod' option to "syntax" and allow folding of |
53 | 54 | classes, modules, methods, code blocks, heredocs and comments. |
54 | 55 |
|
55 | | -vim: ts=8 tw=78 |
| 56 | + vim:tw=78:sw=4:ts=8:ft=help:norl: |
0 commit comments