Kyle Heironimus
Kyle Heironimus

Reputation: 8041

Change janus vim-ruby default hash indentation

Here is how vim-ruby installed by Janus currently indents a method with hash parameters:

my_method(foo: :bar,
          baz: {
  foo2: :bar2,
  foo3: :bar3,
}

I want it to be:

my_method(foo: :bar,
          baz: {
                 foo2: :bar2,
                 foo3: :bar3
          }
         )

How can I make that change in my .vimrc.after?

Upvotes: 0

Views: 60

Answers (1)

Kyle Heironimus
Kyle Heironimus

Reputation: 8041

As @Anthony mentions in his comment, this appears to be a vim-ruby issue. I got around it by adding this to my .vimrc.after

let g:ruby_indent_block_style = 'do' 

It doesn't indent exactly like I mention above, but is good enough.

my_method(foo: :bar,
          baz: {
            foo2: :bar2,
            foo3: :bar3,
          }
         )

Upvotes: 1

Related Questions