Preventing pretty print from replacing := with _?

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

Preventing pretty print from replacing := with _?

Phil B
Is there a setting that will disable this substitution?  I would
actually prefer it to go the other way: if it sees an _ assignment,
replace it with :=

Thanks,
Phil


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Preventing pretty print from replacing := with _?

Juan Vuletich-4
On 7/15/2015 8:43 PM, Phil (list) wrote:
> Is there a setting that will disable this substitution?  I would
> actually prefer it to go the other way: if it sees an _ assignment,
> replace it with :=
>
> Thanks,
> Phil

Please check #syntaxHighlightingAsYouTypeAnsiAssignment and
#syntaxHighlightingAsYouTypeLeftArrowAssignment . Both default to false.

Would turning on #syntaxHighlightingAsYouTypeAnsiAssignment be enough
for you?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Preventing pretty print from replacing := with _?

Hannes Hirzel
I just added an issue for this

https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/issues/67

(for Documentation which I'd like to do later, there are more of
issues like this)

Please update the issue when the answer is known.

--Hannes

On 7/16/15, Juan Vuletich <[hidden email]> wrote:

> On 7/15/2015 8:43 PM, Phil (list) wrote:
>> Is there a setting that will disable this substitution?  I would
>> actually prefer it to go the other way: if it sees an _ assignment,
>> replace it with :=
>>
>> Thanks,
>> Phil
>
> Please check #syntaxHighlightingAsYouTypeAnsiAssignment and
> #syntaxHighlightingAsYouTypeLeftArrowAssignment . Both default to false.
>
> Would turning on #syntaxHighlightingAsYouTypeAnsiAssignment be enough
> for you?
>
> Cheers,
> Juan Vuletich
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Preventing pretty print from replacing := with _?

Phil B
In reply to this post by Juan Vuletich-4
Juan,

On Thu, 2015-07-16 at 10:01 -0300, Juan Vuletich wrote:

> On 7/15/2015 8:43 PM, Phil (list) wrote:
> > Is there a setting that will disable this substitution?  I would
> > actually prefer it to go the other way: if it sees an _ assignment,
> > replace it with :=
> >
> > Thanks,
> > Phil
>
> Please check #syntaxHighlightingAsYouTypeAnsiAssignment and
> #syntaxHighlightingAsYouTypeLeftArrowAssignment . Both default to false.
>
> Would turning on #syntaxHighlightingAsYouTypeAnsiAssignment be enough
> for you?
>

I'm already setting #syntaxHighlightingAsYouTypeAnsiAssignment to true
and leaving #syntaxHighlightingAsYouTypeLeftArrowAssignment at false.
That seems to work for everything except pretty printing.  I also played
with #allowUnderscoreAssignments but that just determines whether or not
_ is valid and doesn't stop pretty print trying to use underscores
anyway (which is entertaining because then pp produces invalid code :-)

> Cheers,
> Juan Vuletich

Thanks,
Phil


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Preventing pretty print from replacing := with _?

Juan Vuletich-4
On 7/16/2015 3:36 PM, Phil (list) wrote:

> Juan,
>
> On Thu, 2015-07-16 at 10:01 -0300, Juan Vuletich wrote:
>> On 7/15/2015 8:43 PM, Phil (list) wrote:
>>> Is there a setting that will disable this substitution?  I would
>>> actually prefer it to go the other way: if it sees an _ assignment,
>>> replace it with :=
>>>
>>> Thanks,
>>> Phil
>> Please check #syntaxHighlightingAsYouTypeAnsiAssignment and
>> #syntaxHighlightingAsYouTypeLeftArrowAssignment . Both default to false.
>>
>> Would turning on #syntaxHighlightingAsYouTypeAnsiAssignment be enough
>> for you?
>>
> I'm already setting #syntaxHighlightingAsYouTypeAnsiAssignment to true
> and leaving #syntaxHighlightingAsYouTypeLeftArrowAssignment at false.
> That seems to work for everything except pretty printing.

But, are you using Shout on the code pane? Can you list simple steps to
reproduce on a fresh Cuis image?

>    I also played
> with #allowUnderscoreAssignments but that just determines whether or not
> _ is valid and doesn't stop pretty print trying to use underscores
> anyway (which is entertaining because then pp produces invalid code :-)

Yep. We could indeed fix that. Ok. I'll include it in the next commit.

Cheers,
Juan Vuletich

>> Cheers,
>> Juan Vuletich
> Thanks,
> Phil
>
>


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org