Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
953e741
Describe `ruby_foldable_groups` option usage
bootleq Aug 2, 2015
d4bd6f6
Helper function for foldable groups
bootleq Aug 2, 2015
283a970
Add example file for syntax test
bootleq Aug 2, 2015
9f93ca9
Complete example for %Q %W %! %x
bootleq Aug 3, 2015
3aadf43
Respect `%` foldable_groups option for %Q %W %! %x
bootleq Aug 3, 2015
9d890e7
Only accept 1 arg for percent_generator
bootleq Aug 3, 2015
f6938f6
Fix %Q syntax example
bootleq Aug 3, 2015
cea3244
Respect `%` foldable_groups option for %q %w %s
bootleq Aug 4, 2015
c9f66b5
Respect `%` foldable_groups option for %r
bootleq Aug 4, 2015
05acf35
Respect `%` foldable_groups option for %i %I
bootleq Aug 8, 2015
f4f2f0a
Example file for verifying normal regex
bootleq Sep 16, 2015
f23b02c
Another part of normal regex example
bootleq Sep 19, 2015
c12d0ff
Add `/` foldable_groups option for normal regexp
bootleq Sep 19, 2015
0407687
Add `string` foldable_groups option
bootleq Sep 20, 2015
1930020
Add `:` foldable_groups option for symbol region
bootleq Sep 20, 2015
3d30d88
Add `<<` foldable_groups option for here document
bootleq Sep 22, 2015
f6742e6
Add `def` `class` `module` foldable_groups options
bootleq Sep 26, 2015
efa55ac
Add `do` `begin` `case` foldable_groups options
bootleq Sep 26, 2015
4c7c160
Add `{` and `[` foldable_groups options
bootleq Sep 27, 2015
575fa5e
Respect `if` foldable_groups option
bootleq Sep 28, 2015
abfd23f
Add `for` foldable_groups option
bootleq Sep 28, 2015
8cf26a5
Add `#` foldable_groups option for comment
bootleq Sep 28, 2015
7346399
Add `__END__` foldable_groups option
bootleq Sep 28, 2015
70a75bc
Prepare to rearrange example files
bootleq Sep 28, 2015
76907a5
Regenerate syntax examples
bootleq Sep 28, 2015
7a2c2cb
Merge branch 'master' into foldable
bootleq May 14, 2016
6caa402
Update example generator to follow master changes
bootleq May 14, 2016
8067516
Delete generated syntax example files
bootleq May 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions doc/ft-ruby-syntax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ There are a number of options to the Ruby syntax highlighting.
1. Ruby operators |ruby_operators|
2. Whitespace errors |ruby_space_errors|
3. Folds |ruby_fold|
4. Reducing expensive operations |ruby_no_expensive| |ruby_minlines|
4. Foldable groups |ruby_foldable_groups|
5. Reducing expensive operations |ruby_no_expensive| |ruby_minlines|


1. Ruby operators *ruby_operators*
Expand Down Expand Up @@ -39,7 +40,40 @@ Folds can be enabled by defining "ruby_fold": >
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*
4. Foldable groups *ruby_foldable_groups*

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 %'
<
value is space-separated keywords, known keywords were:

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

5. 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
Expand Down
Loading