Preserving the space before/after [ ( #14

Closed
basetta opened this Issue Mar 24, 2011 · 8 comments

Comments

Projects
None yet
3 participants
@basetta

basetta commented Mar 24, 2011

Hi,
at work we adopted the following standard

instead of

def main(args : Array[String]) def main( args : Array[ String ] )

I think it improves the readibility of the code IMHO.

Is it possible to preserve those spaces ?

Thx
Pat

@mdr

This comment has been minimized.

Show comment Hide comment
@mdr

mdr Mar 25, 2011

Collaborator

Should be doable. So to clarify -- you want an option for Scalariform to put spaces after and before opening and closing parens ( ) and brackets [ ] respectively, wherever they occur in the syntax (e.g. tuples, class params, method invocations, for/if-else/while etc...)?

Collaborator

mdr commented Mar 25, 2011

Should be doable. So to clarify -- you want an option for Scalariform to put spaces after and before opening and closing parens ( ) and brackets [ ] respectively, wherever they occur in the syntax (e.g. tuples, class params, method invocations, for/if-else/while etc...)?

@basetta

This comment has been minimized.

Show comment Hide comment
@basetta

basetta Mar 25, 2011

Thx :)

It would be nice having:

  • class params
  • method params
  • tuples => ( 1, 2 )
  • type definition => List[ String ] => val l : List[ String ] = List( "pippo", "pluto" )
  • method invocation => like println( "asdas" ) but not runIt()
  • also for the construct for/if/while and so on => if ( pippo==pluto )

Ah right we would like to keep it also for {} in xml snipset eg:

<pippo> <name> { getName() } </name> </pippo>

That's it right now nothing else is crossing my mind

Thx
Pat

basetta commented Mar 25, 2011

Thx :)

It would be nice having:

  • class params
  • method params
  • tuples => ( 1, 2 )
  • type definition => List[ String ] => val l : List[ String ] = List( "pippo", "pluto" )
  • method invocation => like println( "asdas" ) but not runIt()
  • also for the construct for/if/while and so on => if ( pippo==pluto )

Ah right we would like to keep it also for {} in xml snipset eg:

<pippo> <name> { getName() } </name> </pippo>

That's it right now nothing else is crossing my mind

Thx
Pat

@mdr

This comment has been minimized.

Show comment Hide comment
@mdr

mdr Mar 25, 2011

Collaborator

OK, I'll have a crack at it over the weekend if I get chance.

To clarify on this case:

<name> { getName() } </name> 

Did you mean spaces outside of the braces? (The current version will put spaces inside the braces).

Collaborator

mdr commented Mar 25, 2011

OK, I'll have a crack at it over the weekend if I get chance.

To clarify on this case:

<name> { getName() } </name> 

Did you mean spaces outside of the braces? (The current version will put spaces inside the braces).

@basetta

This comment has been minimized.

Show comment Hide comment
@basetta

basetta Mar 25, 2011

no sorry only inside the braces :)

basetta commented Mar 25, 2011

no sorry only inside the braces :)

@mdr

This comment has been minimized.

Show comment Hide comment
@mdr

mdr Mar 26, 2011

Collaborator

Add SpaceInsideParentheses and SpaceInsideBrackets preferences (closed by 9255ed4)

Collaborator

mdr commented Mar 26, 2011

Add SpaceInsideParentheses and SpaceInsideBrackets preferences (closed by 9255ed4)

@mdr mdr closed this Mar 26, 2011

@mdr

This comment has been minimized.

Show comment Hide comment
@mdr

mdr Mar 26, 2011

Collaborator

Righty, I've added the above preferences for this -- hopefully it does what you want,

-- Matt

Collaborator

mdr commented Mar 26, 2011

Righty, I've added the above preferences for this -- hopefully it does what you want,

-- Matt

@basetta

This comment has been minimized.

Show comment Hide comment
@basetta

basetta Mar 28, 2011

thanks a lot. I will test tonight.

Thanks again :)

basetta commented Mar 28, 2011

thanks a lot. I will test tonight.

Thanks again :)

@epmartini

This comment has been minimized.

Show comment Hide comment
@epmartini

epmartini Mar 28, 2011

Thanks it works perfectly

Thanks it works perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment