Skip to content
Open
Changes from 1 commit
Commits
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
Next Next commit
Add highlight group for parentheses
  • Loading branch information
tyok committed Mar 22, 2019
commit 4ea9c779a1422c1015385d811b17a813f789906e
2 changes: 1 addition & 1 deletion syntax/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
" curly bracket block or hash literal
SynFold '{' syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop
SynFold '[' syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<!\[" end="]" contains=ALLBUT,@rubyNotTop
SynFold '(' syn region rubyParenthesedExpression matchgroup=rubyParens start="(" end=")" contains=ALLBUT,@rubyNotTop

" statements without 'do'
SynFold 'begin' syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop
Expand Down Expand Up @@ -446,7 +447,6 @@ syn match rubyOperator "\<defined?" display
syn match rubySymbol "\%([{(,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"he=e-1
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1
syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!=]\=::\@!"hs=s+1,he=e-1
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-1

" __END__ Directive {{{1
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
Expand Down