Re: [Lazarus] Auto indentation

2009-11-06 Thread Graeme Geldenhuys
Jürgen Hestermann wrote: To me BEGIN and END clamp a logical block (that is indented by 3 characters) so they need to be aligned with all commands of the same And this is exactly where standard Tabs or Elastic Tabstops will help. Tab width are user definable, where Spaces for indentation is

Re: [Lazarus] Auto indentation

2009-11-06 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys gra...@mastermaths.co.za: Jürgen Hestermann wrote: To me BEGIN and END clamp a logical block (that is indented by 3 characters) so they need to be aligned with all commands of the same And this is exactly where standard Tabs or Elastic Tabstops will help. Huh?

Re: [Lazarus] Auto indentation

2009-11-06 Thread Graeme Geldenhuys
Mattias Gärtner wrote: To me BEGIN and END clamp a logical block (that is indented by 3 characters) so they need to be aligned with all commands of the same And this is exactly where standard Tabs or Elastic Tabstops will help. Huh? What I meant is that is Tab characters where used for

Re: [Lazarus] Auto indentation

2009-11-05 Thread Hans-Peter Diettrich
Mattias Gaertner schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning insertion and negative deltas

Re: [Lazarus] Auto indentation

2009-11-05 Thread Hans-Peter Diettrich
waldo kitty schrieb: for me, the TAB is to move from field to field in a spread sheet or database... that's the way i was taught and have worked for 30+ years... You should distinguish between updating text and navigation. Tab *characters* are inserted into the text, while the tab *key* is

Re: [Lazarus] Auto indentation

2009-11-05 Thread Martin
Hans-Peter Diettrich wrote: Mattias Gaertner schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning

Re: [Lazarus] Auto indentation

2009-11-05 Thread Jürgen Hestermann
And that's something *I* don't like. You never know which END belongs to wheach BEGIN. I always column align all ENDs to their corresponding BEGINs. You missed the second part of my argumentation. I'm thinking in the superior Modula syntax, that does not require begin-end pairs around

Re: [Lazarus] Auto indentation

2009-11-05 Thread Aleksa Todorovic
On Fri, Nov 6, 2009 at 07:18, Jürgen Hestermann juergen.hesterm...@gmx.de wrote: I *never* put deeper level commands/blocks on the same column Yes, that's one of the worst things one can do. (including BEGIN/END) and I *always* align the BEGIN/ENDs. Absolutely necessary, otherwise you get

Re: [Lazarus] Auto indentation

2009-11-05 Thread Hans-Peter Diettrich
Martin schrieb: With the new synedit OnPaste event I will try to fix the indent on paste. IMO you should rethink the handling of insertion/deletion. A single Replace(start, delta, text) method can handle every case, with positive deltas meaning insertion and negative deltas meaning deletion

Re: [Lazarus] Auto indentation

2009-11-05 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: And that's something *I* don't like. You never know which END belongs to wheach BEGIN. I always column align all ENDs to their corresponding BEGINs. You missed the second part of my argumentation. I'm thinking in the superior Modula syntax, that does not require

Re: [Lazarus] Auto indentation

2009-11-04 Thread Martin
Hans-Peter Diettrich wrote: Graeme Geldenhuys schrieb: Also, as I mentioned, the gEdit plugin that enables elastic tabstops has a option to automatically do conversions. So you can work with elastic tabstops enabled, but when saved, the file gets converted back to using spaces. What will

Re: [Lazarus] Auto indentation

2009-11-03 Thread Paul Ishenin
Mattias Gärtner wrote: * If you don't like other people styles, and always want to your indentation you can turn the context sensitivity off. Then it will only search in your example. choosed this option to test * When pasting code the indenter will indent the whole block - every line by the

Re: [Lazarus] Auto indentation

2009-11-03 Thread Michael Van Canneyt
On Tue, 3 Nov 2009, Mattias Gärtner wrote: The IDE now has a smarter auto indentation algorithm when pressing return or when pasting code. Features: Can all this be switched off ? Michael.-- ___ Lazarus mailing list

Re: [Lazarus] Auto indentation

2009-11-03 Thread Paul Ishenin
Paul Ishenin wrote: Mattias Gärtner wrote: * If you don't like other people styles, and always want to your indentation you can turn the context sensitivity off. Then it will only search in your example. choosed this option to test * When pasting code the indenter will indent the whole block

Re: [Lazarus] Auto indentation

2009-11-03 Thread Mattias Gärtner
Zitat von Michael Van Canneyt mich...@freepascal.org: On Tue, 3 Nov 2009, Mattias Gärtner wrote: The IDE now has a smarter auto indentation algorithm when pressing return or when pasting code. Features: Can all this be switched off ? Of course. Mattias --

Re: [Lazarus] Auto indentation

2009-11-03 Thread Henry Vermaak
2009/11/3 Michael Van Canneyt mich...@freepascal.org: I'm sorry to say, but in my experience many of these well-meant automatic features get it wrong more often than right... I still didn't figure out if it is me or the features that are at fault :( I also tend to disable these features,

Re: [Lazarus] Auto indentation

2009-11-03 Thread Mattias Gärtner
Zitat von Paul Ishenin webpi...@mail.ru: Paul Ishenin wrote: Mattias Gärtner wrote: * If you don't like other people styles, and always want to your indentation you can turn the context sensitivity off. Then it will only search in your example. choosed this option to test * When pasting

Re: [Lazarus] Auto indentation

2009-11-03 Thread Paul Ishenin
Mattias Gärtner wrote: the code in the buffer is: [code] for i := 0 to 10 do if i = j then begin j := i; end; [/code] Just a note: The indenter indents the pasted block as whole, not every line. This has pros and cons. Maybe eventually an option can be added to indent instead every line.

Re: [Lazarus] Auto indentation

2009-11-03 Thread Mattias Gärtner
Zitat von Henry Vermaak henry.verm...@gmail.com: 2009/11/3 Michael Van Canneyt mich...@freepascal.org: I'm sorry to say, but in my experience many of these well-meant automatic features get it wrong more often than right... I still didn't figure out if it is me or the features that are at

Re: [Lazarus] Auto indentation

2009-11-03 Thread Mattias Gärtner
Zitat von Paul Ishenin webpi...@mail.ru: Mattias Gärtner wrote: the code in the buffer is: [code] for i := 0 to 10 do if i = j then begin j := i; end; [/code] Just a note: The indenter indents the pasted block as whole, not every line. This has pros and cons. Maybe eventually an option can

Re: [Lazarus] Auto indentation

2009-11-03 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: The following site explain benefits of Elastic Tabstops and bust some myths: http://tibleiz.net/code-browser/elastic-tabstops.html Source code formatting is a matter of taste. Regardless of the internal storage of horizontal formatting, the result does not

Re: [Lazarus] Auto indentation

2009-11-03 Thread Martin
Jürgen Hestermann wrote: What I am missing with indentation is the good old turbo pascal way where TAB moved below the beginning of the next word in the line above. It was very easy to arrange code with this feature, especially if code was copied (partially) and changed afterwards so that it

Re: [Lazarus] Auto indentation

2009-11-03 Thread Graeme Geldenhuys
On 03/11/2009, Mattias Gärtner nc-gaert...@netcologne.de wrote: The IDE now has a smarter auto indentation algorithm when pressing return or when pasting code. I'll try it tomorrow when I get a Lazarus update. Thanks for the note. By the way, do you know if it is possible to implement the

Re: [Lazarus] Auto indentation

2009-11-03 Thread Martin
Graeme Geldenhuys wrote: By the way, do you know if it is possible to implement the feature request #9650 in Lazarus IDE yet? At the time of the feature request, SynEdit did not have the capability to set variable length tabstops (tabstops based on varying pixel widths) per line. SynEdit could