Re: [lazarus] Editor issues
Lepidosteus wrote: 2 - act weirds with tabs Disable Smart tabs Hilsen Søren _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On 11/09/2007, Lepidosteus [EMAIL PROTECTED] wrote: 1 - lack some features For exemple, when typing begin, I've been used to delphi writing two new lines, end;, ans putting me on the middle line, just where I should type. I understand this is code templates or something like this, and there may even be a way to do it in lazarus yet. My issue is that you install, it doesn't do it. Code templates in Lazarus can only do so much and a little bit more using the available macros. There was talks about implementing something like the 'Code Templates' introduced in Delphi 2005 onwards. The user can define a lot more advanced features and behavior inside a code template xml file. I'm not sure if anybody has started implementing something like this in Lazarus yet. 2 - act weirds with tabs This got me completly off of it and I went back to fpcgui to edit my files. I don't remember the setting I changed, I know I have tried the default ones, they were painfull, I tried using everything available, and it never worked great. The last time I tried Tabs in the Lazarus Editor (a few months back) I noticed and it was confirmed that a lot is missing from the editor for full tab support. Save and loading files containing tabs got corrupted plus a few more. I have no idea what the state is of Tab support in the editor now - Lazarus development moves quite fast. Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On Tue, 11 Sep 2007 08:41:10 +0200 Graeme Geldenhuys [EMAIL PROTECTED] wrote: Save and loading files containing tabs got corrupted plus a few more. Can you give more details? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On Tue, 11 Sep 2007 05:48:03 +0200 Lepidosteus [EMAIL PROTECTED] wrote: Hello, I haven't done a lot of pascal code lately, and even less free pascal code using lazarus. I wanted to make changes in some old software I made for my own usage. After trying the delphi 2007 trial a couple of month ago, I've been really surprised at how bad the lazarus editor feels, *at least with the default install*. I'm not speaking about the IDE, it's as fast as back when I used it, and looks more stable, I didn't get any issue with it while coding. But the editor seems to 1 - lack some features For exemple, when typing begin, I've been used to delphi writing two new lines, end;, ans putting me on the middle line, just where I should type. I understand this is code templates or something like this, and there may even be a way to do it in lazarus yet. My issue is that you install, it doesn't do it. Code templates currently misses this automatism. You have to activate them manually with Ctrl+j. For example: Type b + Ctrl+j. 2 - act weirds with tabs This got me completly off of it and I went back to fpcgui to edit my files. I don't remember the setting I changed, I know I have tried the default ones, they were painfull, I tried using everything available, and it never worked great. Right now my indent block is set to two. function blah(i: string): integer; begin d; // indent: 5 if (true) then dosomework; // indent: 8, 5 + 3 ... end; I could not get it to indent to less than 5 chars on the first tab, which is really too much (it starts *after* the begin word ...). Disable 'smart tabs'. When you try to edit into the tab thing it gets even worse. If I put my caret after dosomework; press enter, i'm on the same column. Yes, it is a ToDo to integrate a good beautifier in lazarus, which can tell nice line indenting. So I need to unindent, i press backspace, it unindent back to column 0. Okay so I press tab to get to my column. It indent to column 8, not 5. Disable 'smart tabs'. That's where it lost me. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
Zitat von Lepidosteus [EMAIL PROTECTED]: [...] But the editor seems to 1 - lack some features For exemple, when typing begin, I've been used to delphi writing two new lines, end;, ans putting me on the middle line, just where I should type. I understand this is code templates or something like this, and there may even be a way to do it in lazarus yet. My issue is that you install, it doesn't do it. I have a question, how it should work 'automatically': Does this mean, you can no longer write 'beginning' in Delphi? Or is the IDE waiting a little, so it is only invoked if you type begin and wait? I guess the last, but who wants to wait? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On Tue, 11 Sep 2007, Mattias Gärtner wrote: Zitat von Lepidosteus [EMAIL PROTECTED]: [...] But the editor seems to 1 - lack some features For exemple, when typing begin, I've been used to delphi writing two new lines, end;, ans putting me on the middle line, just where I should type. I understand this is code templates or something like this, and there may even be a way to do it in lazarus yet. My issue is that you install, it doesn't do it. I have a question, how it should work 'automatically': Does this mean, you can no longer write 'beginning' in Delphi? Or is the IDE waiting a little, so it is only invoked if you type begin and wait? I guess the last, but who wants to wait? My Delphi 7 definitely doesn't do the described behaviour by default; Only if I press ctrl-j after the begin. (Nor would I want it to do this automatically) Michael.
Re: [lazarus] Editor issues
On 11/09/2007, Mattias Gärtner [EMAIL PROTECTED] wrote: I have a question, how it should work 'automatically': Does this mean, you can no longer write 'beginning' in Delphi? Or is the IDE waiting a little, so it is only invoked if you type begin and wait? I guess the last, but who wants to wait? I don't know and I'm guessing here... Doesn't it get triggered when you press the spacebar or enter key after the 'begin' keyword? As far as I know with the new Delphi code templates you can even define the key that triggers the completion. Will trigger code completion: beginspace or enter So typing the following will _not_ trigger code completion: beginningspace or enter will not trigger the code completion I haven't worked on Delphi since v7. Regards, - Graeme - _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On 11/09/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote: My Delphi 7 definitely doesn't do the described behaviour by default; Only if I press ctrl-j after the begin. (Nor would I want it to do this automatically) As far as I know that code template / code completion feature was introduced in Delphi 2005 onwards. Delphi 7 and earlier used Ctrl+J like Lazarus does. Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On 11/09/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote: My Delphi 7 definitely doesn't do the described behaviour by default; Only if I press ctrl-j after the begin. (Nor would I want it to do this automatically) As far as I know that code template / code completion feature was introduced in Delphi 2005 onwards. Delphi 7 and earlier used Ctrl+J like Lazarus does. Invoking code completion with enter is also the way that vb works. Darius Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] Editor issues
But the editor seems to 1 - lack some features For exemple, when typing begin, I've been used to delphi writing two new lines, end;, ans putting me on the middle line, just where I should type. I understand this is code templates or something like this, and there may even be a way to do it in lazarus yet. My issue is that you install, it doesn't do it. I have a question, how it should work 'automatically': Does this mean, you can no longer write 'beginning' in Delphi? Or is the IDE waiting a little, so it is only invoked if you type begin and wait? I guess the last, but who wants to wait? From Delphi 2005 the default option in the editor is to insert a matching end statement when a code block is started by begin and after enter is pressed. It is somewhat irritating since I'm used to automatically fill in the end myself. I can see that it can save typing though. The only problem in Delphi is that the editor sometimes messes up the placement of the end in nested if statements where it is not immediately obvious how the blocks are nested. I have disabled this option at work, but at home it is enabled; which probably shows that it is at least somewhat useful even for old timers like myself. Regards, Christo NOTICE: Please note that this eMail, and the contents thereof, is subject to the standard Sasol eMail legal notice which may be found at: http://www.sasol.com/legalnotices If you cannot access the legal notice through the URL attached and you wish to receive a copy thereof please send an eMail to [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
To the various answers here and there: - about code templates: I got used to it in various editors (namely visual studio and eclipse), some people may not like it and don't want it to be on per default, but for someone coming from thse editors it definetly looks like something is missing. (it should do things after i write begin and press enter yes). - smart tabs help a bit but then indent are of 8 per default instead of 5, and I can't find a way to change that. This is too much. And there is still some strange behaviour sometimes after realoding a doc (I couldn't find a reproducable one easily sorry). Again for code template I'm not saying you _have_ to implement it, just that I miss it, but I can live with that. Tabs issues on the other hand definetely kills the fun of coding. Thanks for for everyone answers -- Vianney Devreese - Lepidosteus http://lepidosteus.com _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On 11/09/2007, Lepidosteus [EMAIL PROTECTED] wrote: - smart tabs help a bit but then indent are of 8 per default instead of 5, and I can't find a way to change that. This is too much. And there is still some strange behaviour sometimes after realoding a doc (I couldn't find a reproducable one easily sorry). If you mean you can't find a place to change this in the editor settings, resize the dialog vertically. I found the same issue in the beginning and didn't know the tab setting was hidden (off screen). Graeme. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Editor issues
On Tue, 11 Sep 2007 14:04:50 +0200 (CEST) [EMAIL PROTECTED] wrote: On 11/09/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote: My Delphi 7 definitely doesn't do the described behaviour by default; Only if I press ctrl-j after the begin. (Nor would I want it to do this automatically) As far as I know that code template / code completion feature was introduced in Delphi 2005 onwards. Delphi 7 and earlier used Ctrl+J like Lazarus does. Invoking code completion with enter is also the way that vb works. (IMHO the vb is an example how a source completion function should *not* work, although I understand why MS did it in this case) Code templates can now be invoked on Enter and/or Space (see the Code Template options). I tried the begin+Enter template example and find it very annoying. To insert a new line I often use End+Enter. If the 'begin' is the last word, it now misunderstands it as template. It would be better to write a small macro function, that checks if an 'end' is missing and adds it only if needed. The ;=+Space to := works nice. Maybe I will add this template to the defaults. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives