[Pharo-project] Smart chars behavior
Hi guys, smart characters are good, but some times annoy... I was trying to write some tests so we could express the behavior we want of them. So, what would you expect from typing the following in a workspace? ws contents: '' type: $( expected: '()' current: '()' ws contents: '' type: $( $( expected: '(())' current: '(()' ws contents: '' type: $( ${ $z expected: '({z})' current: '({z)' "this same happens with simple quotes" ws contents: '' type: $" $" expected: (String with: $" with: $") current: (String with: $" with: $" with: $") ws contents: '' type: $" $' expected: (String with: $" with: $' with: $") or (String with: $" with: $' with: $' with: $") ? current: (String with: $" with: $' with: $") So, what is that you feel annoying from the smart chars?? Could you add your own example? :D Guille in role of detective :)
On 19 October 2012 18:45, Guillermo Polito <guillermopolito@gmail.com> wrote:
"this same happens with simple quotes" ws contents: '' type: $" $" expected: (String with: $" with: $")
â¦with the cursor at the end
ws contents: '' type: $" $' expected: (String with: $" with: $' with: $") or (String with: $" with: $' with: $' with: $") ? current: (String with: $" with: $' with: $")
TextMate says "'|" (| representing the insertion point). It makes sense, in a comment there is a good chance that you mean an apostrophe rather than a opening a literal string.
So, what is that you feel annoying from the smart chars?? Could you add your own example? :D
TextMate has special cases when there are non-white characters to the right of the insertion point before inserting an opening bracket, e.g. ws contents: '|foo' type: $( expected: '(foo' ws contents: '| foo' type: $( expected: '() foo' -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
On Fri, Oct 19, 2012 at 6:59 PM, Damien Pollet <damien.pollet@gmail.com>wrote:
On 19 October 2012 18:45, Guillermo Polito <guillermopolito@gmail.com> wrote:
"this same happens with simple quotes" ws contents: '' type: $" $" expected: (String with: $" with: $")
â¦with the cursor at the end
ws contents: '' type: $" $' expected: (String with: $" with: $' with: $") or (String with: $" with: $' with: $' with: $") ? current: (String with: $" with: $' with: $")
TextMate says "'|" (| representing the insertion point). It makes sense, in a comment there is a good chance that you mean an apostrophe rather than a opening a literal string.
So, what is that you feel annoying from the smart chars?? Could you add your own example? :D
TextMate has special cases when there are non-white characters to the right of the insertion point before inserting an opening bracket, e.g.
ws contents: '|foo' type: $( expected: '(foo'
ws contents: '| foo' type: $( expected: '() foo'
Yes, these are cool. I'll add them to my failing tests :)
-- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
On Oct 19, 2012 10:29 PM, "Stéphane Ducasse" <stephane.ducasse@inria.fr> wrote:
ws contents: '|foo'' type: $' expected: ''|foo'' current: '''|foo''
and then usually I have to remove the fucking extra ' that the system
just blindly added :( This should be the same Damien pointed out for parenthesis :) Anyone else? I remember many complains on the subject...
Stef
I was analyzing my frustration when I tyed since the email and I think that 90% of my problems are related to the space handling ie writiing () on when the (is not close to a character On Oct 21, 2012, at 2:46 PM, Guillermo Polito wrote:
On Oct 19, 2012 10:29 PM, "Stéphane Ducasse" <stephane.ducasse@inria.fr> wrote:
ws contents: '|foo'' type: $' expected: ''|foo'' current: '''|foo''
and then usually I have to remove the fucking extra ' that the system just blindly added :(
This should be the same Damien pointed out for parenthesis :)
Anyone else? I remember many complains on the subject...
Stef
neat idea!
Hi guys,
smart characters are good, but some times annoy... I was trying to write some tests so we could express the behavior we want of them. So, what would you expect from typing the following in a workspace?
ws contents: '' type: $( expected: '()' current: '()'
ws contents: '' type: $( $( expected: '(())' current: '(()'
ws contents: '' type: $( ${ $z expected: '({z})' current: '({z)'
"this same happens with simple quotes" ws contents: '' type: $" $" expected: (String with: $" with: $") current: (String with: $" with: $" with: $")
ws contents: '' type: $" $' expected: (String with: $" with: $' with: $") or (String with: $" with: $' with: $' with: $") ? current: (String with: $" with: $' with: $")
So, what is that you feel annoying from the smart chars?? Could you add your own example? :D
Guille in role of detective :)
participants (3)
-
Damien Pollet -
Guillermo Polito -
Stéphane Ducasse