File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module Foo
2+ class Bar
3+ f do
4+ g { def h ; end }
5+ end
6+
7+ if foo
8+ bar ; end
9+
10+ if bar ; end
11+
12+ foo do
13+ foo = 3 . class
14+ foo = lambda { class One ; end }
15+ foo = lambda { |args | class One ; end }
16+ foo = bar ; class One ; end
17+ end
18+ end
19+ end
Original file line number Diff line number Diff line change @@ -63,10 +63,9 @@ let s:ruby_deindent_keywords =
6363" Regex that defines the start-match for the 'end' keyword.
6464" let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
6565" TODO: the do here should be restricted somewhat (only at end of line)?
66- let s: end_start_regex = ' ^\s*\zs\<\%(module\|class\|def\|if\|for' .
67- \ ' \|while\|until\|case\|unless\|begin\):\@!\>' .
68- \ ' \|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
69- \ ' \<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
66+ let s: end_start_regex =
67+ \ ' \%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
68+ \ ' \<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
7069 \ ' \|\<do:\@!\>'
7170
7271" Regex that defines the middle-match for the 'end' keyword.
You can’t perform that action at this time.
0 commit comments