I'm editing Ruby code in Vim. There is a failure in the Ruby.vim indentation which is bugging me.
Here is a block of code with correct indentation:
text.scan(/#/).each do |match|
line1
line2
end
Here is how Ruby.vim indents the code:
text.scan(/#/).each do |match|
line1
line2
end
All lines subsequent to line2 are indented to the same level as line2.
The issue is caused by the hash (# usually means single line comment) symbol's presence in the regex.
Is anyone able to fix this in Ruby.vim and post the fix here? The problem is still present in the latest ruby.vim source on github, as linked to by Derick below.
Many thanks.