Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Indenation for parameter lists with hashes is broken #2

Closed
larsks opened this Issue Mar 13, 2012 · 0 comments

Comments

Projects
None yet
1 participant

larsks commented Mar 13, 2012

Given a class definition like this:

class myclass (
    $complex_param1=[{
    foo => 'something goes here',
    }],
    $complex_param2=[{
    bar       => 'and something else here',
    }],
    $complex_param3=[{
    baz       => 'look how far over I am!',
    }],
) {

}

Vim with the puppet bundle installed indents it like this:

class myclass ( 
  $complex_param1=[{
    foo => 'something goes here',
    }],                 
    $complex_param2=[{        
      bar => 'and something else here',
      }],                                   
      $complex_param3=[{                          
        baz => 'look how far over I am!',                 
        }],                                                     
) {                                                                   

}                                                                         

Every class parameter with a list of hashes causes the current indent
level to shift. I'm not all that familiar with how vim manages this
sort of thing, so I don't know if this is easy to fix or not.

@rodjek rodjek closed this in 8257198 Jun 9, 2013

@netdata netdata pushed a commit to netdata/vim-puppet that referenced this issue Dec 18, 2014

@rodjek rodjek + Wouter D'Haeseleer Properly indent arrays of hashes
Closes #2
9cebdfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment