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
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 ~
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.
*ruby_spellcheck_strings*
Ruby: Spellchecking strings ~
Ruby syntax will perform spellchecking of strings if you define
"ruby_spellcheck_strings": >
:let ruby_spellcheck_strings = 1
<
SCHEME *scheme.vim* *ft-scheme-syntax*
By default only R7RS keywords are highlighted and properly indented.
scheme.vim also supports extensions of the CHICKEN Scheme->C compiler.
Define b:is_chicken or g:is_chicken, if you need them.
SDL *sdl.vim* *ft-sdl-syntax*
The SDL highlighting probably misses a few keywords, but SDL has so many
of them it's almost impossibly to cope.
The new standard, SDL-2000, specifies that all identifiers are
case-sensitive (which was not so before), and that all keywords can be
used either completely lowercase or completely uppercase. To have the
highlighting reflect this, you can set the following variable: >
:let sdl_2000=1
This also sets many new keywords. If you want to disable the old
keywords, which is probably a good idea, use: >
:let SDL_no_96=1
The indentation is probably also incomplete, but right now I am very
satisfied with it for my own projects.
SED *sed.vim* *ft-sed-syntax*
To make tabs stand out from regular blanks (accomplished by using Todo
highlighting on the tabs), define "g:sed_highlight_tabs" by putting >
:let g:sed_highlight_tabs = 1
<
in the vimrc file. (This special highlighting only applies for tabs
inside search patterns, replacement texts, addresses or text included
by an Append/Change/Insert command.) If you enable this option, it is
also a good idea to set the tab width to one character; by doing that,
you can easily count the number of tabs in a string.