code formatting... adjust the formatting?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

code formatting... adjust the formatting?

sergio_101
i accidentally posted this to the seaside group, so now i am posting it back here to pharo..

i am currently using the code formatting in the browser in pharo 2.0...

it seems to be a lot more aggressive than it has been in the past..

for instance, this:

html anchor url: '#'; with: 'random link'.

gets formatted to:

html anchor
       url: '#';
       with: 'random link'.

is there any way to:

1. keep the browser from splitting the call into multiple lines?
2. narrow down the amount of spaces that make up a tab?

thanks!

--
Reply | Threaded
Open this post in threaded view
|

Re: code formatting... adjust the formatting?

Marcus Denker-4

On 02 Jan 2014, at 19:49, sergio_101 <[hidden email]> wrote:

i accidentally posted this to the seaside group, so now i am posting it back here to pharo..

i am currently using the code formatting in the browser in pharo 2.0...

it seems to be a lot more aggressive than it has been in the past..

for instance, this:


gets formatted to:

html anchor
       url: '#';
       with: 'random link'.

is there any way to:

1. keep the browser from splitting the call into multiple lines?
2. narrow down the amount of spaces that make up a tab?

Hello! 

There are actually 3 implementation for a code formatter in Pharo2… this means
it is a bit random which is used ;-)

But Nautilus uses explicitly the selected formatter in the settings from RB.
(In Pharo 1.4 it might have been the one of the old AST or the non-configurable one…)

(And, yes, it’s a *dumb* idea to have 3 implementations of anything… therefore, in Pharo3,
there is just one…)

So: In the settings for “Refactoring Engine” there is a sub-category “Configurable Formatter”

deselect

New line after cascade
and
New line before first cascade

—> formats without the multiple lines.

The tab size is not changeable… that would be a general editor setting which does not exist yet, 
as far as I know.

Marcus

Reply | Threaded
Open this post in threaded view
|

Re: code formatting... adjust the formatting?

sergio_101
awesome! thanks!



On Thu, Jan 2, 2014 at 2:56 PM, Marcus Denker <[hidden email]> wrote:

On 02 Jan 2014, at 19:49, sergio_101 <[hidden email]> wrote:

i accidentally posted this to the seaside group, so now i am posting it back here to pharo..

i am currently using the code formatting in the browser in pharo 2.0...

it seems to be a lot more aggressive than it has been in the past..

for instance, this:


gets formatted to:

html anchor
       url: '#';
       with: 'random link'.

is there any way to:

1. keep the browser from splitting the call into multiple lines?
2. narrow down the amount of spaces that make up a tab?

Hello! 

There are actually 3 implementation for a code formatter in Pharo2… this means
it is a bit random which is used ;-)

But Nautilus uses explicitly the selected formatter in the settings from RB.
(In Pharo 1.4 it might have been the one of the old AST or the non-configurable one…)

(And, yes, it’s a *dumb* idea to have 3 implementations of anything… therefore, in Pharo3,
there is just one…)

So: In the settings for “Refactoring Engine” there is a sub-category “Configurable Formatter”

deselect

New line after cascade
and
New line before first cascade

—> formats without the multiple lines.

The tab size is not changeable… that would be a general editor setting which does not exist yet, 
as far as I know.

Marcus




--