Re: [Pharo-project] Dedicated to days of wasted time in your life, formatting source code for replacing spaces with tabs
nice, now i get the title! please integrate it. Fernando On Sun, Mar 11, 2012 at 10:34 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 11 March 2012 22:22, Bernardo Ezequiel Contreras <vonbecmann@gmail.com> wrote:
now, i get it. GREAT!
it works with shift key as well.
On Sun, Mar 11, 2012 at 6:11 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 11 March 2012 21:59, Bernardo Ezequiel Contreras <vonbecmann@gmail.com> wrote:
sorry, but i didn't get it
just try this: open empty workspace. press and hold a space key for 5 seconds.. now get to the beginning of text using arrow key.
do same with and without patch. compare.
On Sun, Mar 11, 2012 at 5:40 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I actually tried the code, but I cannot figure out what I should look at. Could you perhaps be more explicit in what the original issue is?
Cheers, Doru
On 11 Mar 2012, at 21:25, Igor Stasenko wrote:
On 11 March 2012 20:43, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Mar 11, 2012, at 8:25 PM, Igor Stasenko wrote:
On 11 March 2012 18:30, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
should we integrated that?
i posted it here so people can evaluate.
for me it is not a question :)
you lost me but I guess that you mean yes.
well, since i spent time implementing it, it would be surprise if i will say 'no'. but it looks like this is not important to people, since nobody replied to this post except you.
But of course, we could make this behavior optional, controlled via settings.
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com
"Being happy is a matter of choice."
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
sorry for not explaining the feature properly.. I just wanna ask, what do you think, it we're going to integrate that: a) should it be optional or we can use it by default? b) if it is optional, what is default setting on/off? I vote for (a).. Because: What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments? While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes). -- Best regards, Igor Stasenko.
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: Â a) should it be optional or we can use it by default? Â b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
Hi, Ok, I took a look. Please do not integrate this as it is. Here are my reasons: - TextMorphs are supposed to be used for other things than source code, and for non-experienced-smalltalk-programmers, this would be quite alien. - You already have a reasonably similar functionality with Ctrl pressed. This functionality is the same as in other editors on your machine, which brings familiarity. It would be better to have your functionality added to the Ctrl one. Cheers, Doru On 12 Mar 2012, at 03:58, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: a) should it be optional or we can use it by default? b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com "Quality cannot be an afterthought."
Le 12/03/2012 06:16, Tudor Girba a écrit :
Hi,
Ok, I took a look.
Please do not integrate this as it is. +1. Cheers Alain
Here are my reasons: - TextMorphs are supposed to be used for other things than source code, and for non-experienced-smalltalk-programmers, this would be quite alien. - You already have a reasonably similar functionality with Ctrl pressed. This functionality is the same as in other editors on your machine, which brings familiarity. It would be better to have your functionality added to the Ctrl one.
Cheers, Doru
On 12 Mar 2012, at 03:58, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko<siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: a) should it be optional or we can use it by default? b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com
"Quality cannot be an afterthought."
On 12 March 2012 06:16, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
Ok, I took a look.
Please do not integrate this as it is. Here are my reasons: - TextMorphs are supposed to be used for other things than source code, and for non-experienced-smalltalk-programmers, this would be quite alien. - You already have a reasonably similar functionality with Ctrl pressed. This functionality is the same as in other editors on your machine, which brings familiarity. It would be better to have your functionality added to the Ctrl one.
Yeah, except that i cannot use it, because Apple , on Lion thinks that it is better to use Ctrl-left/ctrl-right for switching between "full screen apps", whatever it means.. It looks that Apple doesn't fears about alienating text-editor users by changing key bindings.
Cheers, Doru
On 12 Mar 2012, at 03:58, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: Â a) should it be optional or we can use it by default? Â b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com
"Quality cannot be an afterthought."
-- Best regards, Igor Stasenko.
This is indeed, the poorest design decision I saw from Apple. But, of course, you can set something more sensible (I did) for switching between spaces, like Apple+Ctrl or so. If you do not know how to do it (this is another poor design decision), you can see it here: http://www.tudorgirba.com/blog/in-between-spaces Cheers, Doru On Mon, Mar 12, 2012 at 1:14 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 12 March 2012 06:16, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
Ok, I took a look.
Please do not integrate this as it is. Here are my reasons: - TextMorphs are supposed to be used for other things than source code, and for non-experienced-smalltalk-programmers, this would be quite alien. - You already have a reasonably similar functionality with Ctrl pressed. This functionality is the same as in other editors on your machine, which brings familiarity. It would be better to have your functionality added to the Ctrl one.
Yeah, except that i cannot use it, because Apple , on Lion thinks that it is better to use Ctrl-left/ctrl-right for switching between "full screen apps", whatever it means.. It looks that Apple doesn't fears about alienating text-editor users by changing key bindings.
Cheers, Doru
On 12 Mar 2012, at 03:58, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: Â a) should it be optional or we can use it by default? Â b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com
"Quality cannot be an afterthought."
-- Best regards, Igor Stasenko.
-- www.tudorgirba.com "Every thing has its own flow"
Igor would it be not more clever to integrate keyMapper and add Ctrl-a Ctrl-e because has that since decades now? I would not integrate such change in its current state Because for me going back one character is important and it is important to jump at the beginning of the line but that I know how to do it: ctrl-A and at the end Ctrl-e. Cut a line Ctrl-Kâ¦. So ... Stef On Mar 12, 2012, at 3:58 AM, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: a) should it be optional or we can use it by default? b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On 12 March 2012 21:23, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Igor
would it be not more clever to integrate keyMapper and add Ctrl-a Ctrl-e because has that since decades now? It is orthogonal. Ctrl-a btw selects all text.. which kind-of windowish behavior, but it is also quite useful.
I would not integrate such change in its current state
Because for me going back one character is important and it is important to jump at the beginning of the line
Stef, you can go back & forth by one character, unless you are at multiple whitespace characters, which is treated as single whitespace. This is not my invention. I borrowing that from typography systems, a white space between words treated as a single whitespace, because usually, a typography system using kerning rules and adjusts spaces width in order to justify text in a line so it will align to column edges. You can take any newspaper and see the effect. Obviously, nobody using multiple spaces in text to align it.. because space width may vary. And hence, no need to put more than one space between words. Tabs having special meaning , however. Usually they used at the beginning of line. And usually again, you don't need to be able to navigate to each particular tab character, you always want to navigate either to start of line, or to start of a text.. and this is 1 key stroke with my patch, with one finger. no need to use ctrl-a /ctrl-e
but that I know how to do it: ctrl-A and at the end Ctrl-e. Cut a line Ctrl-Kâ¦.
So ...
so try format the attached. and you will see a difference
Stef
On Mar 12, 2012, at 3:58 AM, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: Â a) should it be optional or we can use it by default? Â b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On Mar 12, 2012, at 9:50 PM, Igor Stasenko wrote:
On 12 March 2012 21:23, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Igor
would it be not more clever to integrate keyMapper and add Ctrl-a Ctrl-e because has that since decades now? It is orthogonal. Ctrl-a btw selects all text.. which kind-of windowish behavior, but it is also quite useful.
Not in emacs and not with mail on mac :)
I would not integrate such change in its current state
Because for me going back one character is important and it is important to jump at the beginning of the line
Stef, you can go back & forth by one character, unless you are at multiple whitespace characters, which is treated as single whitespace.
This is not my invention. I borrowing that from typography systems, a white space between words treated as a single whitespace, because usually, a typography system using kerning rules and adjusts spaces width in order to justify text in a line so it will align to column edges. You can take any newspaper and see the effect. Obviously, nobody using multiple spaces in text to align it.. because space width may vary. And hence, no need to put more than one space between words. Tabs having special meaning , however. Usually they used at the beginning of line. And usually again, you don't need to be able to navigate to each particular tab character, you always want to navigate either to start of line, or to start of a text.. and this is 1 key stroke with my patch, with one finger. no need to use ctrl-a /ctrl-e
but that I know how to do it: ctrl-A and at the end Ctrl-e. Cut a line Ctrl-Kâ¦.
So ...
so try format the attached. and you will see a difference
Stef
On Mar 12, 2012, at 3:58 AM, Igor Stasenko wrote:
On 12 March 2012 03:50, Igor Stasenko <siguctua@gmail.com> wrote:
sorry for not explaining the feature properly..
I just wanna ask, what do you think, it we're going to integrate that: a) should it be optional or we can use it by default? b) if it is optional, what is default setting on/off?
I vote for (a).. Because: ^^^ a) as not-optional :)
What i finding hard is imagining situation, where old behavior will be less time consuming/more appropriate. Can anyone can come up with cons arguments?
While is important to fully control each whitespace character(s) separately, when you editing/typing text (as in languages like Python they even make it part of syntax... (what a stupid idea.. can't resist sorry)), for navigating the text an importance of stepping over every whitespace character seems to be leaning to zero.. (well, at least in my eyes).
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko. <ContextPart-doPrimitivemethodreceiverargs.st>
actually, originally i was looking for a bit different thing: i wanted that if user double-clicks on white space, it should select all whitespace characters between two non-space characters. but when i found the code responsible for that, i understood that it will be not so easy to do and most probably will break a current behavior. Btw, Firefox behavior on double-clicking between two words is also not satisfying: try double click between this word and this , and see. Neither Chrome: it just selects single space.. But TextEdit (on Macs) does exactly what i would expect from well-behaving text editor. -- Best regards, Igor Stasenko.
I say add it with a setting... everybody should be happy with this :) though you know that I would prefer stefs proposal more :P On 2012-03-12, at 22:02, Igor Stasenko wrote:
actually, originally i was looking for a bit different thing: i wanted that if user double-clicks on white space, it should select all whitespace characters between two non-space characters. but when i found the code responsible for that, i understood that it will be not so easy to do and most probably will break a current behavior.
Btw, Firefox behavior on double-clicking between two words is also not satisfying: try double click between this word and this , and see.
Neither Chrome: it just selects single space..
But TextEdit (on Macs) does exactly what i would expect from well-behaving text editor.
-- Best regards, Igor Stasenko.
participants (6)
-
Alain Plantec -
Camillo Bruni -
Fernando Olivero -
Igor Stasenko -
Stéphane Ducasse -
Tudor Girba