Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-03

About the "Trim Spaces Style" modes. Which one should be the default mode?

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sayyid Ibnu Husein Al-'Aththÿffffffffffffffffe2s

With regard to my 0013298report ( http://bugs.freepascal.org/view.php?id=13298#c26380 ), this is my comment about the "Trim Spaces Style" located in the editor options.

In my opinion, the "Caret or Edit" mode should be the default mode although each mode listed there is reasonable/logical to be the default. The reason is merely because of the objective of FPC & Lazarus project.

FPC is a multiplatform compiler which emulate Delphi, and Lazarus is a multiplatform IDE for FPC. Its consequence is that default behaviours of Lazarus editor should follow Delphi editor whenever possible, especially in basic functionalities.

In fact, almost FPC/Lazarus users are either former or still Delphi users; and I tend to presume that at least a half of them (including me) are lazy in finding out and memorizing the default behaviour differences between those two editors.

What do you think, guys?

Thank you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20090326/8b76d8db/attachment.html

Reply by email

Martin Friebe
to Sayyid Ibnu Husein Al-'Aththÿffffffffffffffffe2s
Sayyid Ibnu Husein Al-'Athth?ffffffffffffffffe2s wrote 24 lines
With regard to my 0013298 <http://bugs.freepascal.org/view.php?id=13298#c26380> report ( http://bugs.freepascal..org/view.php?id=13298#c26380 <http://bugs.freepascal.org/view.php?id=13298#c26380> ), this is my comment about the "Trim Spaces Style" located in the editor options. In my opinion, the "Caret or Edit" mode should be the default mode although each mode listed there is reasonable/logical to be the default. The reason is merely because of the objective of FPC & Lazarus project. FPC is a multiplatform compiler which emulate Delphi, and Lazarus is a multiplatform IDE for FPC. Its consequence is that default behaviours of Lazarus editor should follow Delphi editor whenever possible, especially in basic functionalities. In fact, almost FPC/Lazarus users are either former or still Delphi users; and I tend to presume that at least a half of them (including me) are lazy in finding out and memorizing the default behaviour differences between those two editors. What do you think, guys?

I have updated the wiki
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Trim_trailing_spaces and put some explanations in what other issues there are with trimming http://wiki.lazarus.freepascal.org/AboutTrimTrailingSpaces (especially tabs, which previously did not work)

Some previous discussion can be found here:
http://www.lazarus.freepascal.org/pipermail/lazarus/2008-October/020466.html

In general whatever expectation is made to Trimming spaces, have a thought about how it would work in a meaningful way with:
- tabs (See wiki and previous discussion) they work, an exception was made for the all new "position only mode" added today ( this includes auto-indent, if it is set to copy tabs)
- "Caret Past EOL": trim trailing spaces works independent of this. (the new Position only mode, allows the caret to go Past EOL (even if the option is off). But it only does so using tab or space key.

Since there have been various discussions by now, it crystallizes that there are 2 main groups of users:
1) People who do not use/need tabs, and don't want to see any trailing spaces (not even temporarily)
2) People who want to use tabs. And therefore have a need to have them temporarily added

On 2: See the wiki about this behaviour. I think as long as they are present (until they get trimmed) they should affect all (caret; end; backspace and of course text typed behind them).
Making (within the same settings) some parts of Synedit obey those temporary spaces/tabs and others not, does not seem a good idea to me.

For the 2nd group all of the modes that were available worked. For the first group I have re-implemented the "position only" mode. (which attempts to be as close to the original mode as possible (but will convert tabs to spaces))

* As for the default. *
Since indeed a few people got irritated by the temporarily inserted spaces, I have set it to "leave or edit line".

Best Regards
Martin

Reply by email

Martin Friebe
to Sayyid Ibnu Husein Al-'Aththÿffffffffffffffffe2s: With regard to my 0013298report ( http://bugs.freepascal.org/view.php?id=13298#c26380 ),…
Sayyid Ibnu Husein Al-'Athth?ffffffffffffffffe2s wrote 22 lines
With regard to my 0013298 <http://bugs.freepascal.org/view.php?id=13298#c26380> report ( http://bugs.freepascal..org/view.php?id=13298#c26380 <http://bugs.freepascal.org/view.php?id=13298#c26380> ), this is my comment about the "Trim Spaces Style" located in the editor options. In my opinion, the "Caret or Edit" mode should be the default mode although each mode listed there is reasonable/logical to be the default. The reason is merely because of the objective of FPC & Lazarus project. FPC is a multiplatform compiler which emulate Delphi, and Lazarus is a multiplatform IDE for FPC. Its consequence is that default behaviours of Lazarus editor should follow Delphi editor whenever possible, especially in basic functionalities. In fact, almost FPC/Lazarus users are either former or still Delphi users; and I tend to presume that at least a half of them (including me) are lazy in finding out and memorizing the default behaviour differences between those two editors.

Btw, I just checked turbo-delphi: It trims on "leave line" only.

Reply by email

Sayyid Ibnu Husein Alatas
to Martin Friebe

________________________________

Earlier message 28 lines
From: Martin Friebe Sent: Friday, March 27, 2009 1:21:27 AM Subject: Re: [Lazarus] About the "Trim Spaces Style" modes. Which one should be the default mode? Sayyid Ibnu Husein Alatas wrote: > ... ... > In my opinion, the "Caret or Edit" mode should be the default mode > although each mode listed there is reasonable/logical to be the > default. The reason is merely because of the objective of FPC & > Lazarus project. > ... ... > > Btw, I just checked turbo-delphi: It trims on "leave line" only. _______________________________________________ I don't have Turbo Delphi, but Delphi 7 and Delphi 2009. My test show that both Delphi 7 and Delphi 2009 use "Caret or Edit" mode. Since there is a difference between those versions, I commend it to Lazarus Developers. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20090326/55e2899b/attachment.html

Reply by email

Flávio Etrusco
to Sayyid Ibnu Husein Alatas: ________________________________ From: Martin Friebe Sent: Friday, March 27, 2009 1:21:27…
Show quoted text 10 lines
> Btw, I just checked turbo-delphi: It trims on "leave line" only. _______________________________________________ I don't have Turbo Delphi, but Delphi 7 and Delphi 2009. My test show that both Delphi 7 and Delphi 2009 use "Caret or Edit" mode. Since there is a difference between those versions, I commend it to Lazarus Developers.

Just the "behavior name" don't show the whole picture. The problem is "Caret or Edit" mode in SynEdit has the bug Martin said. Delphi7 worked-around it somehow (maybe saving the current cursor line in a field?) but D2007 has several minor bugs regarding it.

-Fl?vio

Reply by email

Martin Friebe
to Flávio Etrusco
Fl?vio Etrusco wrote 18 lines
> Btw, I just checked turbo-delphi: It trims on "leave line" only. > _______________________________________________ > > I don't have Turbo Delphi, but Delphi 7 and Delphi 2009. My test show that > both Delphi 7 and Delphi 2009 use "Caret or Edit" mode. > > Since there is a difference between those versions, I commend it to Lazarus > Developers. > > Just the "behavior name" don't show the whole picture. The problem is "Caret or Edit" mode in SynEdit has the bug Martin said. Delphi7 worked-around it somehow (maybe saving the current cursor line in a field?) but D2007 has several minor bugs regarding it.

Not sure which bug you refer too? (And which Lazarus Revision?)

About the names, I am more than happy to accept some better proposals :)

Best Regards
Martin

Reply by email