window. The language is heavily
inspired by CSS stylesheet. Files with the following extensions are recognized
as rasi files: .rasi.
READLINE *readline.vim* *ft-readline-syntax*
The readline library is primarily used by the BASH shell, which adds quite a
few commands and options to the ones already available. To highlight these
items as well you can add the following to your |vimrc| or just type it in the
command line before loading a file with the readline syntax: >
let readline_has_bash = 1
This will add highlighting for the commands that BASH (version 2.05a and
later, and part earlier) adds.
REGO *rego.vim* *ft-rego-syntax*
Rego is a query language developed by Styra. It is mostly used as a policy
language for kubernetes, but can be applied to almost anything. Files with
the following extensions are recognized as rego files: .rego.
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
Syntax highlighting is enabled for code blocks within the document for a
select number of file types. See $VIMRUNTIME/syntax/rst.vim for the default
syntax list.
To set a user-defined list of code block syntax highlighting: >
let rst_syntax_code_list = ['vim', 'lisp', ...]
To assign multiple code block types to a single syntax, define
`rst_syntax_code_list` as a mapping: >
let rst_syntax_code_list = {
\ 'cpp': ['cpp', 'c++'],
\ 'bash': ['bash', 'sh'],
...
\ }
To use color highlighting for emphasis text: >
let rst_use_emphasis_colors = 1
To enable folding of sections: >
let rst_fold_enabled = 1
Note that folding can cause performance issues on some platforms.
REXX *rexx.vim* *ft-rexx-syntax*
If you notice highlighting errors while scrolling backwards, which are fixed
when redrawing with CTRL-L, try setting the "rexx_minlines" internal variable
to a larger number: >
:let rexx_minlines = 50
This will make the syntax synchronization start 50 lines before the first
displayed line. The default value is 10. The disadvantage of using a larger
number is that redrawing can become slow.
Vim tries to guess what type a ".r" file is. If it can't be detected (from
comment lines), the default is "r". To make the default rexx add this line to
your vimrc: *g:filetype_r*
>
:let g:filetype_r = "r"
RUBY *ruby.vim* *ft-ruby-syntax*
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|
*ruby_operators*
Ruby: Operator highlighting ~
Operators can be highlighted by defining "ruby_operators": >
:let ruby_operators = 1
<
*ruby_space_errors*
Ruby: Whitespace 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.
*ruby_fold* *ruby_foldable_groups*
Ruby: Folding ~
Folding can be enabled by defining "ruby_fold": >
:let ruby_fold = 1
<
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.
Default folding is rather detailed, i.e., small syntax units like "if", "do",
"%w[]" may create corresponding fold levels.
You can set "ruby_foldable_groups" to restrict which groups are foldable: >
:let ruby_foldable_groups = 'if case %'
<
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