Skip to content

Commit 4b612b2

Browse files
committed
Fix indent of if as 1.9 hash key
validates_presence_of :foo, if: ->{ bar? }
1 parent dcb81f3 commit 4b612b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/ruby.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
5454
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
5555
\ '\|rescue\)\>' .
5656
\ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
57-
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
57+
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
5858

5959
" Regex used for words that, at the start of a line, remove a level of indent.
6060
let s:ruby_deindent_keywords =

0 commit comments

Comments
 (0)