Skip to content
Browse files

Improve performance of some slow rubySymbol patterns

  • Loading branch information...
1 parent 3378844 commit 01196b077f7e5d8a4ccff4dfec6752d5601ff5fc @dkearns dkearns committed Jun 26, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 syntax/ruby.vim
View
4 syntax/ruby.vim
@@ -456,9 +456,9 @@ syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%([_[:lower:]][_[:aln
syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE
" More Symbols {{{1
-syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
+syn match rubySymbol "\%([{(,]\_s*\)\zs\l\w*[!?]\=::\@!"he=e-1
syn match rubySymbol "[]})\"':]\@1<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1
-syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
+syn match rubySymbol "\%([{(,]\_s*\)\zs[[:space:],{]\l\w*[!?]\=::\@!"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

0 comments on commit 01196b0

Please sign in to comment.
Something went wrong with that request. Please try again.