Skip to content

Commit

Permalink
Skip over Ruby endless "def"
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Mar 23, 2022
1 parent dbc1ebc commit 9fd91ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/endwise.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ augroup endwise " {{{1
autocmd FileType ruby
\ let b:endwise_addition = 'end' |
\ let b:endwise_words = 'module,class,def,if,unless,case,while,until,begin,do' |
\ let b:endwise_pattern = '^\(.*=\)\?\s*\%(private\s\+\|protected\s\+\|public\s\+\|module_function\s\+\)*\zs\%(module\|class\|def\|if\|unless\|case\|while\|until\|for\|\|begin\)\>\%([^#]*[^.:@$#]\<end\>\)\@!\|\<do\ze\%(\s*|.*|\)\=\s*$' |
\ let b:endwise_pattern = '^\(.*=\)\?\s*\%(private\s\+\|protected\s\+\|public\s\+\|module_function\s\+\)*\zs\%(def\s\+[^[:space:]()]\+\s*\%(([^()]*)\)\=\s*=\)\@!\%(module\|class\|def\|if\|unless\|case\|while\|until\|for\|\|begin\)\>\%([^#]*[^.:@$#]\<end\>\)\@!\|\<do\ze\%(\s*|.*|\)\=\s*$' |
\ let b:endwise_syngroups = 'rubyModule,rubyClass,rubyDefine,rubyControl,rubyConditional,rubyRepeat'
autocmd FileType crystal
\ let b:endwise_addition = 'end' |
Expand Down

0 comments on commit 9fd91ae

Please sign in to comment.