summaryrefslogtreecommitdiffstats
path: root/runtime/doc/syntax.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-11 15:07:27 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-11 15:07:27 +0200
commit7e1479b86c590a66b63a274c079b7f18907d45a4 (patch)
tree0f13f244eb42df988c75209adfa4bb703794c310 /runtime/doc/syntax.txt
parent4930a76a0357f76a829eafe4985d04cf3ce0e9e0 (diff)
Updated runtime files, Japanese translations.
Diffstat (limited to 'runtime/doc/syntax.txt')
-rw-r--r--runtime/doc/syntax.txt120
1 files changed, 78 insertions, 42 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index d01cc9fcca..aa8846ddb8 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2016 Aug 16
+*syntax.txt* For Vim version 7.4. Last change: 2016 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2669,68 +2669,104 @@ your .vimrc: *g:filetype_r*
RUBY *ruby.vim* *ft-ruby-syntax*
-There are a number of options to the Ruby syntax highlighting.
+ Ruby: Operator highlighting |ruby_operators|
+ Ruby: Whitespace errors |ruby_space_errors|
+ Ruby: Folding |ruby_fold| |ruby_foldable_groups|
+ Ruby: Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
+ Ruby: Spellchecking strings |ruby_spellcheck_strings|
-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: >
+ *ruby_operators*
+ Ruby: Operator highlighting ~
- :let ruby_no_expensive = 1
+Operators can be highlighted by defining "ruby_operators": >
+
+ :let ruby_operators = 1
<
-In this case the same color will be used for all control keywords.
+ *ruby_space_errors*
+ Ruby: Whitespace errors ~
-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: >
+Whitespace errors can be highlighted by defining "ruby_space_errors": >
- :let ruby_minlines = 100
+ :let ruby_space_errors = 1
<
-Ideally, this value should be a number of lines large enough to embrace your
-largest class or module.
+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.
+
+ *ruby_fold* *ruby_foldable_groups*
+ Ruby: Folding ~
-Highlighting of special identifiers can be disabled by removing the
-rubyIdentifier highlighting: >
+Folding can be enabled by defining "ruby_fold": >
- :hi link rubyIdentifier NONE
+ :let ruby_fold = 1
<
-This will prevent highlighting of special identifiers like "ConstantName",
-"$global_var", "@@class_var", "@instance_var", "| block_param |", and
-":symbol".
+This will set the value of 'foldmethod' to "syntax" locally to the current
+buffer or window, which will enable syntax-based folding when editing Ruby
+filetypes.
+
+ *ruby_foldable_groups*
+Default folding is rather detailed, i.e., small syntax units like "if", "do",
+"%w[]" may create corresponding fold levels.
-Significant methods of Kernel, Module and Object are highlighted by default.
-This can be disabled by defining "ruby_no_special_methods": >
+You can set "ruby_foldable_groups" to restrict which groups are foldable: >
- :let ruby_no_special_methods = 1
+ :let ruby_foldable_groups = 'if case %'
<
-This will prevent highlighting of important methods such as "require", "attr",
-"private", "raise" and "proc".
+The value is a space-separated list of keywords:
+
+ keyword meaning ~
+ -------- ------------------------------------- ~
+ ALL Most block syntax (default)
+ NONE Nothing
+ if "if" or "unless" block
+ def "def" block
+ class "class" block
+ module "module" block
+ do "do" block
+ begin "begin" block
+ case "case" block
+ for "for", "while", "until" loops
+ { Curly bracket block or hash literal
+ [ Array literal
+ % Literal with "%" notation, e.g.: %w(STRING), %!STRING!
+ / Regexp
+ string String and shell command output (surrounded by ', ", `)
+ : Symbol
+ # Multiline comment
+ << Here documents
+ __END__ Source code after "__END__" directive
+
+ *ruby_no_expensive*
+ Ruby: Reducing expensive operations ~
-Ruby operators can be highlighted. This is enabled by defining
-"ruby_operators": >
+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_operators = 1
+ :let ruby_no_expensive = 1
<
-Whitespace errors can be highlighted by defining "ruby_space_errors": >
+In this case the same color will be used for all control keywords.
- :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.
+ *ruby_minlines*
-Folding can be enabled by defining "ruby_fold": >
+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_fold = 1
+ :let ruby_minlines = 100
<
-This will set the 'foldmethod' option to "syntax" and allow folding of
-classes, modules, methods, code blocks, heredocs and comments.
+Ideally, this value should be a number of lines large enough to embrace your
+largest class or module.
+
+ *ruby_spellcheck_strings*
+ Ruby: Spellchecking strings ~
-Folding of multiline comments can be disabled by defining
-"ruby_no_comment_fold": >
+Ruby syntax will perform spellchecking of strings if you define
+"ruby_spellcheck_strings": >
- :let ruby_no_comment_fold = 1
+ :let ruby_spellcheck_strings = 1
<
SCHEME *scheme.vim* *ft-scheme-syntax*