We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34a0862 commit a9073e5Copy full SHA for a9073e5
etc/examples/indent/blocks.rb
@@ -1,3 +1,15 @@
1
+do
2
+ something
3
+end
4
+
5
+def foo
6
+ a_hash = {:do => 'bar'}
7
8
9
+def foo(job)
10
+ job.do!
11
12
13
proc do |(a, b)|
14
puts a
15
puts b
indent/ruby.vim
@@ -66,7 +66,7 @@ let s:ruby_deindent_keywords =
66
let s:end_start_regex =
67
\ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
68
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
69
- \ '\|\<do:\@!\>'
+ \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
70
71
" Regex that defines the middle-match for the 'end' keyword.
72
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>'
0 commit comments