how do I turn off "smart" quotes in Pharo Seaside one-click image

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

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Lukas Renggli
2010/7/31 Nick Ager <[hidden email]>:

> Hi Lukas,
>
>> > My apologies - I've just downloaded the latest Eclipse and you are
>> > correct
>> > the smart-characters work in a similar manor. However one important
>> > usability difference is that when entering a string, my brain won't stop
>> > my
>> > fingers from closing the quote - even though my eyes see "Smart
>> > Characters"
>> > have automatically inserted the closing quote. On Eclipse the editor
>> > infers
>> > I'm typing the closing quote/bracket etc and skips over the already
>> > inserted
>> > "Smart Character", in Pharo it inserts another set of quotes giving me
>> > three
>> > quotes at the end of my string and leaving the insertion point between
>> > the
>> > first the second quote.  I think this issue was shared by our
>> > CampSmalltalk
>> > beginners.
>>
>> That's fairly easy to adapt, please try the following version from
>> <http://source.lukas-renggli.ch/unsorted>:
>>
>>  Name: ECompletion-lr.126
>>  Author: lr
>>  Time: 31 July 2010, 4:10:04 pm
>>  UUID: 777d55d6-95e9-4630-a5ac-b35347286646
>>  Ancestors: ECompletion-lr.125
>>
>>  - try to be smarter with smart characters
>
> Thanks for the that - it's getting there. A couple of issues:
> * The change appears to have introduced odd delete behaviour. When I delete
> a character within smart quotes, a character *and* the ending smart quote is
> deleted - different behaviour to prior to your change,
> * If I enter:  ('   in Eclipse when I type:  ') it skips over both the
> closing ' and the closing ).
> Apologies for my pedantry.

Well, I am sorry I said it is fairly easy to adapt. The implementation
was really bogus because it globally kept state. I rewrote the code
from scratch and committed it here:

  Name: ECompletion-lr.127
  Author: lr
  Time: 31 July 2010, 7:21:25 pm
  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
  Ancestors: ECompletion-lr.126

  - rewrote the complete smart character logic (very ugly)

Now this is really ugly and long code and there are literally dozens
of cases to handle. Let me know if it works better for you? I kind of
like it. The behavior for smart characters and the backspace is now
entirely different if there is a selection or if you are just typing.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Stéphane Ducasse
>>>
>
> Well, I am sorry I said it is fairly easy to adapt. The implementation
> was really bogus because it globally kept state. I rewrote the code
> from scratch and committed it here:
>
>  Name: ECompletion-lr.127
>  Author: lr
>  Time: 31 July 2010, 7:21:25 pm
>  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
>  Ancestors: ECompletion-lr.126
>
>  - rewrote the complete smart character logic (very ugly)
>
> Now this is really ugly and long code and there are literally dozens
> of cases to handle. Let me know if it works better for you? I kind of
> like it. The behavior for smart characters and the backspace is now
> entirely different if there is a selection or if you are just typing

sound exciting....


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Nick
>  Name: ECompletion-lr.127
>  Author: lr
>  Time: 31 July 2010, 7:21:25 pm
>  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
>  Ancestors: ECompletion-lr.126
>
>  - rewrote the complete smart character logic (very ugly)
>
> Now this is really ugly and long code and there are literally dozens
> of cases to handle. Let me know if it works better for you? I kind of
> like it. The behavior for smart characters and the backspace is now
> entirely different if there is a selection or if you are just typing

sound exciting....

Hi Lukas,

I noticed you've just added  ECompletion-lr.128. I've briefly tried it. Perhaps I'm missing something, as the functionality seem to be the same as ECompletion-lr.125, so if you type an extra ' at the end of a string, it inserts another two.
Is there something else I need to update?

Nick

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Lukas Renggli
Please try again ECompletion-lr.128. I further simplified the code.
Now it is exactly the behavior of TextMate. And almost the same as
Eclipse.

Lukas

2010/7/31 Nick Ager <[hidden email]>:

>> >  Name: ECompletion-lr.127
>> >  Author: lr
>> >  Time: 31 July 2010, 7:21:25 pm
>> >  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
>> >  Ancestors: ECompletion-lr.126
>> >
>> >  - rewrote the complete smart character logic (very ugly)
>> >
>> > Now this is really ugly and long code and there are literally dozens
>> > of cases to handle. Let me know if it works better for you? I kind of
>> > like it. The behavior for smart characters and the backspace is now
>> > entirely different if there is a selection or if you are just typing
>>
>> sound exciting....
>
> Hi Lukas,
> I noticed you've just added  ECompletion-lr.128. I've briefly tried it.
> Perhaps I'm missing something, as the functionality seem to be the same
> as ECompletion-lr.125, so if you type an extra ' at the end of a string, it
> inserts another two.
> Is there something else I need to update?
> Nick
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Lukas Renggli
Ehh ECompletion-lr.129.

On 31 July 2010 22:11, Lukas Renggli <[hidden email]> wrote:

> Please try again ECompletion-lr.128. I further simplified the code.
> Now it is exactly the behavior of TextMate. And almost the same as
> Eclipse.
>
> Lukas
>
> 2010/7/31 Nick Ager <[hidden email]>:
>>> >  Name: ECompletion-lr.127
>>> >  Author: lr
>>> >  Time: 31 July 2010, 7:21:25 pm
>>> >  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
>>> >  Ancestors: ECompletion-lr.126
>>> >
>>> >  - rewrote the complete smart character logic (very ugly)
>>> >
>>> > Now this is really ugly and long code and there are literally dozens
>>> > of cases to handle. Let me know if it works better for you? I kind of
>>> > like it. The behavior for smart characters and the backspace is now
>>> > entirely different if there is a selection or if you are just typing
>>>
>>> sound exciting....
>>
>> Hi Lukas,
>> I noticed you've just added  ECompletion-lr.128. I've briefly tried it.
>> Perhaps I'm missing something, as the functionality seem to be the same
>> as ECompletion-lr.125, so if you type an extra ' at the end of a string, it
>> inserts another two.
>> Is there something else I need to update?
>> Nick
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Lukas Renggli
The latest also highlights the matching character.

On 31 July 2010 22:12, Lukas Renggli <[hidden email]> wrote:

> Ehh ECompletion-lr.129.
>
> On 31 July 2010 22:11, Lukas Renggli <[hidden email]> wrote:
>> Please try again ECompletion-lr.128. I further simplified the code.
>> Now it is exactly the behavior of TextMate. And almost the same as
>> Eclipse.
>>
>> Lukas
>>
>> 2010/7/31 Nick Ager <[hidden email]>:
>>>> >  Name: ECompletion-lr.127
>>>> >  Author: lr
>>>> >  Time: 31 July 2010, 7:21:25 pm
>>>> >  UUID: 42e3e807-2478-4dda-b207-acf162648cfe
>>>> >  Ancestors: ECompletion-lr.126
>>>> >
>>>> >  - rewrote the complete smart character logic (very ugly)
>>>> >
>>>> > Now this is really ugly and long code and there are literally dozens
>>>> > of cases to handle. Let me know if it works better for you? I kind of
>>>> > like it. The behavior for smart characters and the backspace is now
>>>> > entirely different if there is a selection or if you are just typing
>>>>
>>>> sound exciting....
>>>
>>> Hi Lukas,
>>> I noticed you've just added  ECompletion-lr.128. I've briefly tried it.
>>> Perhaps I'm missing something, as the functionality seem to be the same
>>> as ECompletion-lr.125, so if you type an extra ' at the end of a string, it
>>> inserts another two.
>>> Is there something else I need to update?
>>> Nick
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Nick
Hi Lukas,

I've installed ECompletion-lr.130. 

It works brilliantly if I type: ('  correctly skipping over ') at the end.

However if I type a single ' it doesn't add a closing ' - is this what you're seeing?

Cheers

Nick

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Lukas Renggli
> I've installed ECompletion-lr.130.
> It works brilliantly if I type: ('  correctly skipping over ') at the end.
> However if I type a single ' it doesn't add a closing ' - is this what
> you're seeing?

Try ECompletion-lr.131, this fixes another set of bugs including the
one you reported.

The complexity of the code is quite horrible. Basically each of the
following cases has to be handled separately:

- selection? yes/no
- cursor at begin? yes/no
- cursor at end? yes/no
- open and close smart character the same? yes/no
- close character and next character in text the same? yes/no

Let me know if you find any more bugs.

Lukas


> Cheers
> Nick
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Nick
Try ECompletion-lr.131, this fixes another set of bugs including the
one you reported.

That seems to have nailed it. I'll use it for real today and see if I spot anything else, but so far so good.

Thanks again

Nick

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Piers Cawley
2010/8/1 Nick Ager <[hidden email]>:
>> Try ECompletion-lr.131, this fixes another set of bugs including the
>> one you reported.
>
> That seems to have nailed it. I'll use it for real today and see if I spot
> anything else, but so far so good.
> Thanks again

Where can I find those changes - my Monticello browser pointing at
squeaksource can only see up to ECompletion-lr.122

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how do I turn off "smart" quotes in Pharo Seaside one-click image

Nick

Where can I find those changes - my Monticello browser pointing at
squeaksource can only see up to ECompletion-lr.122



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
12