Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hefty reformatting of the syntax docs

  • Loading branch information...
commit f5c3ad2ee81edff3c96d3cf042bec7c39d76a6d3 1 parent 8637525
@rolfb rolfb authored
Showing with 42 additions and 18 deletions.
  1. +42 −18 doc/ft-ruby-syntax.txt
View
60 doc/ft-ruby-syntax.txt
@@ -1,43 +1,67 @@
-RUBY *ruby.vim* *ft-ruby-syntax*
+RUBY *ruby.vim* *ft-ruby-syntax*
There are a number of options to the Ruby syntax highlighting.
-By default, the "end" keyword is colorized according to the opening statement
-of the block it closes. While useful, this feature can be expensive; if you
-experience slow redrawing (or you are on a terminal with poor color support)
-you may want to turn it off by defining the "ruby_no_expensive" variable: >
+1. Ruby operators |ruby_operators|
+2. Whitespace errors |ruby_space_errors|
+3. Folds |ruby_fold|
+4. Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
- :let ruby_no_expensive = 1
-<
-In this case the same color will be used for all control keywords.
-If you do want this feature enabled, but notice highlighting errors while
-scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
-the "ruby_minlines" variable to a value larger than 50: >
+==============================================================================
+1. Ruby operators *ruby_operators*
- :let ruby_minlines = 100
-<
-Ideally, this value should be a number of lines large enough to embrace your
-largest class or module.
+Ruby operators can be highlighted.
-Ruby operators can be highlighted. This is enabled by defining
-"ruby_operators": >
+This is enabled by defining "ruby_operators": >
:let ruby_operators = 1
<
+
+==============================================================================
+2. Whitespace errors *ruby_space_errors*
+
Whitespace errors can be highlighted by defining "ruby_space_errors": >
:let ruby_space_errors = 1
<
+
This will highlight trailing whitespace and tabs preceded by a space character
as errors. This can be refined by defining "ruby_no_trail_space_error" and
"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after
spaces respectively.
+==============================================================================
+3. Folds *ruby_fold*
+
+Folds can be enabled by defining "ruby_fold": >
+
:let ruby_fold = 1
<
+
This will set the value |foldmethod| to "syntax" locally to the current buffer
or window, which will enable syntax-based folding when editing Ruby filetypes.
->
+
+==============================================================================
+4. Reducing expensive operations *ruby_no_expensive*
+
+By default, the "end" keyword is colorized according to the opening statement
+of the block it closes. While useful, this feature can be expensive; if you
+experience slow redrawing (or you are on a terminal with poor color support)
+you may want to turn it off by defining the "ruby_no_expensive" variable: >
+
+ :let ruby_no_expensive = 1
+<
+In this case the same color will be used for all control keywords.
+
+ *ruby-minlines*
+If you do want this feature enabled, but notice highlighting errors while
+scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
+the "ruby_minlines" variable to a value larger than 50: >
+
+ :let ruby_minlines = 100
+<
+Ideally, this value should be a number of lines large enough to embrace your
+largest class or module.
vim:tw=78:sw=4:ts=8:ft=help:norl:
Please sign in to comment.
Something went wrong with that request. Please try again.