Lazarus Code Editor vs Rest of the World... lazarus / 9-Editor ---------------------------------------------------------------------- Fred vS · 2014-01-07 12:33 Hello everybody.  I have tested mainly all the other code editors (Geany, NotePad++, Gedit,.., and many, many others...) and i have to say, in my opinion, that Lazarus code editor is highly better than all the others. Lot of respect and congratulations. ---------------------------------------------------------------------- hinst · 2014-01-07 12:42 I agree. Lazarus offers the best code editor. That is for FreePascal language, of course. It still could be improved to support latest FPC language features better; like nested types and generics ---------------------------------------------------------------------- exdatis · 2014-01-07 12:43 Quote from: Fred vS on January 07, 2014, 01:33:22 pmHello everybody.  I have tested mainly all the other code editors (Geany, NotePad++, Gedit,.., and many, many others...) and i have to say, in my opinion, that Lazarus code editor is highly better than all the others. Lot of respect and congratulations. Agree! ---------------------------------------------------------------------- Fred vS · 2014-01-07 12:49 Maybe the only thing that i have find in Geany and not in Lazarus is a compiler-command choice. In Geany you can add other compiler-commands so it is easy to switch from fpc 2.6.2 to 2.7.1. But that is detail and, i fact, not part of the code editor... So, i do not have find a code editor that has more (better) features than the one of Lazarus... ---------------------------------------------------------------------- taazz · 2014-01-07 12:54 Go to Tools\Options dialog and select the environment\Files on the left tree there you will find the "compiler path", "FPC Source Directory" and "Make Path" options which you can change to use any fpc version you want as long as they are installed in different directories ---------------------------------------------------------------------- Edson · 2014-01-07 15:47 Yes, it's a great IDE, but it will be better if we include: * Column Mode Editing. Like Notepad++ have.  We only have Column Mode Selecting.  http://forum.lazarus.freepascal.org/index.php/topic,21684. msg127258.html#msg127258 * Automatic Completion Menu (no need for press Ctrl+space).  Like Notepad++ have.  http://forum.lazarus.freepascal.org/index.php/topic,2 3152.msg137794.html#msg137794 * Highlight the current block where the Caret is. Like Notepad++ have. * Window for message error without hide the source editor.  http://for um.lazarus.freepascal.org/index.php/topic,22764.msg135032.html#msg1350 32 ---------------------------------------------------------------------- Martin_fr · 2014-01-07 16:31 Quote from: Edson on January 07, 2014, 04:47:19 pm* Highlight the current block where the Caret is. Like Notepad++ have. N++ highlights the current line (If that is what you mean). It looks like paragraph, because of line wrapping. SynEdit also has current line HL. ---------------------------------------------------------------------- Edson · 2014-01-07 16:39 Yes I know, SynEdit has Current Line HL. I refer to highlight the folding mark, on the Gutter: ---------------------------------------------------------------------- Martin_fr · 2014-01-07 16:53 Ok. But with SynEdit, you can be in 3 (or 4) blocks at the same time: - begin end - ifdef - region - current selection Still it would be a nice feature. An alternative would be cnpack style lines: http://sourceforge.net/projects/cnwizards/ ---------------------------------------------------------------------- Fred vS · 2014-01-07 19:40 QuoteGo to Tools\Options dialog and select the environment\Files on the left tree there you will find the "compiler path", "FPC Source Directory" and "Make Path" options which you can change to use any fpc version you want as long as they are installed in different directories Yep, thank-you, of course i know that but it is heavy to do... PS : If you push me a little bit, i could develop a plugin for Lazarus who permits to choose the compiler and the options you want before compilation. At first glance i see it as a Trayicon, if you click on it, you get a list of different possible fpc configuration. Click on the wanted config and it will load it, ready for compilation... ---------------------------------------------------------------------- taazz · 2014-01-08 03:04 Quote from: Martin_fr on January 07, 2014, 05:53:15 pmOk. But with SynEdit, you can be in 3 (or 4) blocks at the same time: - begin end - ifdef - region - current selection Still it would be a nice feature. An alternative would be cnpack style lines: http://sourceforge.net/projects/cnwizards/ If I get a vote then I would go with the cnpack view I like it a lot better and being used to it from delphi is a plus too . ---------------------------------------------------------------------- Leledumbo · 2014-01-08 05:37 QuoteYep, thank-you, of course i know that but it is heavy to do...Define some build modes for different compiler version (no need to mess with global compiler path) and save the project as a template (install project templates package first). Next time, create project from this template instead. ---------------------------------------------------------------------- Martin_fr · 2014-01-08 10:31 Quote from: Leledumbo on January 08, 2014, 06:37:51 amQuoteYep, thank- you, of course i know that but it is heavy to do...Define some build modes for different compiler version (no need to mess with global compiler path) and save the project as a template (install project templates package first). Next time, create project from this template instead. Out of interest: How to you change the compiler version (essentially the executable of fpc) in the buildmodes? At least on windows, each fpc is a separate install in a different folder. I have 2 folders with 2.6.2 one compiled rtl with debug, and one without. How do I switch? Despite if I put that in build modes, I must duplicate every existing build mode... ---------------------------------------------------------------------- hinst · 2014-01-08 11:05 Quote from: Martin_fr on January 08, 2014, 11:31:15 amHow to you change the compiler version (essentially the executable of fpc) in the buildmodes? In project options choose Compiler Options tree node, then Compiler Commands sub-node, three panels will appear on the right of the dialog: Execute before, Compiler, Execute after. Notice value in Compiler field: $(CompPath). I believe that you can specify compiler version for the current build mode by changing the value of this field. $(CompPath) will use default compiler which is specified in Environment options; It should be possible to specify path to any other compiler instance; like C:\FPC\1.0.0\fpc.exe ... However there is one possible drawback: the IDE will still look in the same directory for compiler sources, so if you decide to take a look at source code for some unit from RTL by ctrl+clicking unit name in the editor... Well, you got it. It will show the very same source file from FPC source directory which can be configured in Environment options. So this may lead to some confusion. I hope I managed to explain this clear enough On Linux the easiest way to have multiple versions of FPC installed is using fpcup utility ---------------------------------------------------------------------- Martin_fr · 2014-01-08 11:49 Ah, yes. But as I said, that multiplies all other build modes. (And as you said, does not work for codetools) The multiplication of build modes is of course a generic issue. It applies to many settings, that one could match and mix. ---------------------------------------------------------------------- Fred vS · 2014-01-08 11:57 QuoteDefine some build modes for different compiler version (no need to mess with global compiler path) Ok, but also heavy... I was thinking to do a application that deals directly with EnvironmentOptions.xml. If  i change  CompilerFilename Value= and  FPCSourceDirectory Value=, it must do the trick ( Yes/No ?). I have test it and it works for me... ---------------------------------------------------------------------- Martin_fr · 2014-01-08 12:23 It's a tricky topic. I have my ideas about that too. And I wouldn't mind an extension for the global compiler-opts (even just, instead of having to change 2 (or 3) dropdowns, have one master and the other follow... BUT this a very much expert settings. Having them in the global opts, is yet another tripwire for beginners. So there is a point. I am not sure what is best. And I do not know what other developers think about this. Not all may be reading here. Maybe this should be continued on the mail list? ---------------------------------------------------------------------- Fred vS · 2014-01-08 12:29 QuoteAnd I do not know what other developers think about this Hum, sorry but about what ? ---------------------------------------------------------------------- Martin_fr · 2014-01-08 12:31 About: adding a compiler switcher ---------------------------------------------------------------------- Fred vS · 2014-01-08 12:33 QuoteAbout: adding a compiler switcher Ah, OK. But if it is a plugin, where is the problem ? ---------------------------------------------------------------------- Martin_fr · 2014-01-08 12:35 Well that be nice. I probably use it. (I prefer it outside the build mode.) ---------------------------------------------------------------------- Fred vS · 2014-01-08 12:38 QuoteWell that be nice. I probably use it. (I prefer it outside the build mode.) Nice, give me please some time to test everything (works on Linux, not yet tested on Windows) and i will give it in github. ---------------------------------------------------------------------- Fred vS · 2014-01-08 14:12 My conclusion is :  Lazarus-editor is the best source code editor i have find. If you ask me : What do you want to change in Lazarus-editor  ? I will answer : quasi nada, I only would have preferred, if a console- source-file or a file without forms (library, ...etc) was loaded, that  the components-palette and the object-inspector are hidden...  [EDIT] (easy, in  /ide/main.pp => procedure TMainIDE.DoOpenEditorFile() => if loaded(Afilename.lfm) then mainide.width := full_size else  mainide.width := only_command_size ) Also, it will be great if it was possible to add-link (from external tools menu) some more icons in the command palette... ---------------------------------------------------------------------- taazz · 2014-01-08 15:54 Quote from: Fred vS on January 08, 2014, 03:12:00 pmAlso, it will be great if it was possible to add-link (from external tools menu) some more icons in the command palette... thats an addin I plan to write the idea is to be able to create multiple submenus under any menu you like you can add any external program you like and if the pascal script is already installed might allow you to write commands that might manipulate the IDE it self as well or talk directly with the os something along the lines of the active scripting in windows, ..... well you get the idea I hope, that of course requires a lot of time and I do not have a working prototype for manipulating the existing menus yet so go figure. ---------------------------------------------------------------------- Leledumbo · 2014-01-08 16:34 QuoteHowever there is one possible drawback: the IDE will still look in the same directory for compiler sources, so if you decide to take a look at source code for some unit from RTL by ctrl+clicking unit name in the editor... Well, you got it. It will show the very same source file from FPC source directory which can be configured in Environment options. So this may lead to some confusion. I hope I managed to explain this clear enoughHmm... this is right, I think a plugin or something to easily switch fpc version could indeed be useful. Not for me though, as I always stick to trunk. ---------------------------------------------------------------------- Martin_fr · 2014-01-08 18:19 Well with regards to layout only (show OI or palette), there is the idea of different desktop setting anyway. The main reason, is to switch window size and pos for debug and work, but it can be switched for other reasons too. and I see no problem with having project specific desktops. If you go that way, please consider discussing it on the mail list, and see if t can be included as default. ---------------------------------------------------------------------- Fred vS · 2014-01-08 19:19 QuoteI was thinking to do a application that deals directly with EnvironmentOptions.xml. Hum, i have very bad news  I have play with EnvironmentOptions.xml and have changed, at run time (when Lazarus is running) CompilerFilename Value=  and   FPCSourceDirectory Value=,  and when i compile a project via Lazarus- Compile menu, Lazarus erase the changes and replace initial data just before compil. I find it very sad and it closes all doors for creating plugin. [EDIT] Or, maybe (and last hope) EnvironmentOptions.xml must be edited only with some external tools, never with conventional way (it is what i used): Code: [Select] {$IFDEF Linux} envifile := GetUserDir +'.lazarus/environmentoptions.xml' ; newfpc := '"/usr/lib/newfpc/fpc/bin/x86_64-linux/fpc"'; newsrcfpc := '"/usr/lib/newfpc/fpcsrc/"'; {$ENDIF} if fileexists(pchar(envifile)) then                 begin    AssignFile(f,pchar(envifile));    Reset(F);    dataf := '' ;    dataf2 := '' ;      while not eof(f) do      begin        Readln(F, dataf2);        if   Pos(''  ;          if   Pos(''  ;        if trim(dataf2) <> '' then dataf := dataf +  #13#10  + dataf2 ;                 end;         CloseFile(f);       AssignFile(f,pchar(envifile ));     rewrite(f);    writeln(f,dataf) ;     Flush(f);       CloseFile(f);             end; ---------------------------------------------------------------------- Fred vS · 2014-01-09 12:24 Quote (and last hope) No, Lazarus does not want to open himself to the rest of  world... ( no possibility to create plugin, hostility against other widgetsets than LCL, ...) Im very sad. ---------------------------------------------------------------------- Martin_fr · 2014-01-09 12:30 Quote from: Fred vS on January 09, 2014, 01:24:52 pmNo, Lazarus does not want to open himself to the rest of  world... Are you serious? You can even write commercial plug-ins.... But that aside, for this stuff IDEIntf is made. Unfortunately it does not expose the Env-Opts. Maybe that can be changed. I dont know... Need to see what the team thinks.  (and that means mailing list again, since not every member of the team reads here) ---------------------------------------------------------------------- Fred vS · 2014-01-09 12:43 QuoteAre you serious? You can even write commercial plug-ins.... Witch one ? If i even cannot access to config-files, what can i do ? And the way you treats other widgetsets is "petit esprit" : see your web-page : Programming : LCL for questions about the GUI toolkit from Lazarus, the Lazarus Component Library... (of course nothing for others...) Widgetset For programming questions on a specific widgetset Child Boards: Carbon , Cocoa , GTK , QT , Win32/64 , WinCE , CustomDrawn , Other : ( many, many thanks for the "other", it is too generous...) When i see so many people who give, for free, their time and knowledge for Lazarus, the greatest selfish, i think that people are really too generous (or too stupid). ---------------------------------------------------------------------- BigChimp · 2014-01-09 12:45 Quote from: Fred vS on January 08, 2014, 08:19:48 pmQuoteI was thinking to do a application that deals directly with EnvironmentOptions.xml. Hum, i have very bad news  I have play with EnvironmentOptions.xml and have changed, at run time (when Lazarus is running) CompilerFilename Value=  and   FPCSourceDirectory Value=,  and when i compile a project via Lazarus- Compile menu, Lazarus erase the changes and replace initial data just before compil. I find it very sad and it closes all doors for creating plugin. [EDIT] Or, maybe (and last hope) EnvironmentOptions.xml must be edited only with some external tools, never with conventional way (it is what i used): Code: [Select] {$IFDEF Linux} envifile := GetUserDir +'.lazarus/environmentoptions.xml' ; newfpc := '"/usr/lib/newfpc/fpc/bin/x86_64-linux/fpc"'; newsrcfpc := '"/usr/lib/newfpc/fpcsrc/"'; {$ENDIF} if fileexists(pchar(envifile)) then                 begin    AssignFile(f,pchar(envifile));    Reset(F);    dataf := '' ;    dataf2 := '' ;      while not eof(f) do      begin        Readln(F, dataf2);        if   Pos(''  ;          if   Pos(''  ;        if trim(dataf2) <> '' then dataf := dataf +  #13#10  + dataf2 ;                 end;         CloseFile(f);       AssignFile(f,pchar(envifile ));     rewrite(f);    writeln(f,dataf) ;     Flush(f);       CloseFile(f);             end;          TBH, I think you may be misunderstanding how to deal with environmentoptions.xml. I'm sure there is no conspiracy within the Lazarus dev community against others who want to integrate with Lazarus. Have a look at the fpcup source code (updatelazconfig unit) which writes out a minimum environmentoptions.xml etc. It's open source. You can copy it if you want & of course, improvements more than welcome. ---------------------------------------------------------------------- BigChimp · 2014-01-09 12:48 Quote from: Fred vS on January 09, 2014, 01:43:38 pmAnd the way you treats other widgetsets is "petit esprit" : see your weg-page : Saying that people should go to the developers of the relevant code for support questions IS TOTALLY NOT SURPRISING and commonly done. Sorry for shouting, but I cannot believe you don't understand that. Quote from: Fred vS on January 09, 2014, 01:43:38 pmProgramming : LCL for questions about the GUI toolkit from Lazarus, the Lazarus Component Library... (of course nothing for others...) Well... update the wiki then... keeping in mind the point above. Quote from: Fred vS on January 09, 2014, 01:43:38 pmWidgetset For programming questions on a specific widgetset Child Boards: Carbon , Cocoa , GTK , QT , Win32/64 , WinCE , CustomDrawn , Other : ( many, many thanks for the "other", it is too generous...) See my point above. Quote from: Fred vS on January 09, 2014, 01:43:38 pmWhen i see so many people who give, for free, their time and knowledge for Lazarus, the greatest selfish, i think that people are really too generous (or too stupid). When I see so many people involved in improving both Lazarus and other related projects I think that going on about conspiracies, atmosphere etc is a waste of time. If you have problems with some texts/code, improve it, don't keep complaining about it. ---------------------------------------------------------------------- Fred vS · 2014-01-09 12:52 QuoteHave a look at the fpcup source code (updatelazconfig unit) which writes out a minimum environmentoptions.xml etc. Please, dont obfuscate. I m talking about RUNTIME modifications, not modification before or after you load Lazarus. ---------------------------------------------------------------------- BigChimp · 2014-01-09 12:53 Sorry for trying to help. Edit: you're saying I'm obfuscating. Obfuscating means intentionally clouding the issue. I did not try to do that; I really was trying to help. Once again, I would suggest you try to think more positively of the intention of others. ---------------------------------------------------------------------- Fred vS · 2014-01-09 13:02 QuoteOnce again, I would suggest you try to think more positively of the intention of others. Maybe (...surely) you do remember my old furious message about AT- SPI... Trust me, i battle to be positive vs Lazarus but I am disappointed. ---------------------------------------------------------------------- BigChimp · 2014-01-09 13:06 Ehm yes, and I could have said the same then.... but to do so takes some trust that the other person (you in this case) is willing to listen and accept what you're saying... which I'm now sure about (Argh, sorry for the amateur psychology etc. I'm actually quite interested in having Lazarus config file management to be externally accessible so I can dump our hand-crafted fpcup emulation stuff and depend on The One True Implementation). ---------------------------------------------------------------------- Fred vS · 2014-01-09 13:14 QuoteI'm actually quite interested in having Lazarus config file management to be externally accessible so I can dump our hand-crafted fpcup emulation stuff and depend on The One True Implementation Super, thanks. Now, last question for everybody: Do you think it is possible to change things without shouting? ---------------------------------------------------------------------- JuhaManninen · 2014-01-09 18:37 Quote from: Fred vS on January 09, 2014, 02:14:16 pmDo you think it is possible to change things without shouting? Definitely. I was already wondering your negative attitude earlier. It does not help at all. Instead you should learn IDEIntf and Environment Options code and design how to add interface for those options, and finally provide a patch. I have studied and modified those pieces of code, I believe you can do it, too. And this is not irony or such. It is the realistic way to get things done. ---------------------------------------------------------------------- Fred vS · 2014-01-09 19:13 QuoteI was already wondering your negative attitude earlier Witch earlier negative attitude ? The one  when i asked help about at_spi ? Indeed, my negative attitude force me (because no other choice) to create sak, the speaker-assistive-kit. Or maybe the one to listen to ALL demands for uos and do all the suggestions ? If you want my advise, i was already wondering your negative attitude earlier about the anti.democracy of Lazarus. Quotenstead you should learn IDEIntf and Environment Options code and design how to add interface for those options, and finally provide a patch. Hum, i have already done some patches (without any comment of Lazarus- team, of course) http://forum.lazarus.freepascal.org/index.php/topic,12481.msg136323.ht ml#msg136323 PS : I have lot of respect for what you have done for Delphi translation. ---------------------------------------------------------------------- Fred vS · 2014-01-09 19:37 @ Juha :  be careful when you make people hot. Yes, in democracy, you can change things by voting. If you are not a democracy, the only way to make things change is by the revolution. [EDIT] Adios a todos, viva la revolución. ---------------------------------------------------------------------- JuhaManninen · 2014-01-09 20:06 Quote from: Fred vS on January 09, 2014, 08:13:24 pmIf you want my advise, i was already wondering your negative attitude earlier about the anti.democracy of Lazarus. That is a sensitive topic especially because the terms are so loaded with meanings already. My attitude was not really negative but it was provocative, admitted. I have an obsession to sometimes make provocative comments. The context then was the complete chaos after trying to put up a new web-page. QuoteHum, i have already done some patches (without any comment of Lazarus-team, of course) http://forum.lazarus.freepascal.org/index.php/topic,12481.msg136323.ht ml#msg136323 I did not notice that. It is a Lazarus plugin for FpGui designer, right? I think Lazarus core distribution is not the best place for it. Instead we should push for a new package manager system which allows selecting and installing packages easily from repositories. Mattias made some pre-alpha code (Aarre) but nothing is functional yet. For example the Industrial package may be moved to external repository when such system works. We try to keep the core Lazarus slim. QuotePS : I have lot of respect for what you have done for Delphi translation. Thanks! It is a challenging but also frustrating project because it will never be good. Many Delphi projects are impossible to convert. ---------------------------------------------------------------------- Fred vS · 2014-01-09 20:27 @ Juha : ok, i prefer that way you talk. Now, before i left, i really want to ask to Lazarus team to seriously think about doing Lazarus "Plugin" compatible (not components for LCL, plugin for Lazarus IDE.) That means, give the possibility (easy, not complicated guru-way)  to load external programs, even when Lazarus is running, for : - change compiler config before to compile - when Lazarus opens file - when  Lazarus closes file - when  Lazarus saves file I will contribute (if i may/can) with pleasure and positively. And maybe, with that new "plugin" feature, open Lazarus for other worlds, even other language, (a plugin for C is possible) . Imagine Lazarus code editor with plugins : it will beat all the other (geany and friends). PS : Im a democrat but i like revolution. PS2 : Qui bene amat, bene castigat. ---------------------------------------------------------------------- JuhaManninen · 2014-01-11 14:58 Quote from: Fred vS on January 09, 2014, 09:27:22 pmNow, before i left, i really want to ask to Lazarus team to seriously think about doing Lazarus "Plugin" compatible (not components for LCL, plugin for Lazarus IDE.) That means, give the possibility (easy, not complicated guru-way)  to load external programs, even when Lazarus is running, for : - change compiler config before to compile - when Lazarus opens file - when  Lazarus closes file - when  Lazarus saves file Look at class TLazIDEInterface in package IDEIntf. It already allows you to do many things in a plugin but more is needed for sure. For example now it has file events for "Saving All" and "Saved All" but not for saving a single file. A patch for more interface methods and events is welcome. ... "to load external programs" ... Do you really mean an external program instead of a dynamic plugin? Geany and many other programs have dynamic plugins implemented as .dll or .so libraries. They can be loaded at run-time. Lazarus only supports static plugins (= packages) but in reality it is not a big difference. You only need to build Lazarus, that's all. If you really mean external programs then you need a GUI to configure them. Yes, the IDE could let you define commands before and after file operations. Compiler Options -> Compiler commands already lets you configure external programs before and after compilation. File -> Actions ... menu item could do a similar thing for editor files. A dialog inside the IDE does not even require changes in IDEIntf. It can use methods and properties of the IDE itself. However I think those file events should be added as they can be useful for other packages. QuoteImagine Lazarus code editor with plugins : it will beat all the other (geany and friends). I looked at Geany again after a long time. It is a nice IDE, easy to use and intuitive. It supports a huge amount of languages and file formats. Still, its features do not match other top IDEs dedicated for a certain language and GUI lib. You suggested extending Lazarus for C and other languages. I think it is a waste of time because a C or Java programmer would never switch from his favorite IDE to Lazarus. Besides, many things in Lazarus internals are hard-coded for FPC and Pascal. Good support for C is just not very realistic. Let's instead make this an even better Pascal IDE. One interesting development will be other "Wirthian" languages in FPC, if it even happens. But now let's improve the Lazarus IDEIntf. If you don't do it, I add it to my ToDo list (which is long). ---------------------------------------------------------------------- marcov · 2014-01-11 17:29 Quote from: Fred vS on January 09, 2014, 09:27:22 pm@ Juha : ok, i prefer that way you talk. Now, before i left, i really want to ask to Lazarus team to seriously think about doing Lazarus "Plugin" compatible (not components for LCL, plugin for Lazarus IDE.) Afaik you can create a plugin that traps those events and runs programs that you configure somewhere else. Somebody that believes in that only has to make it. (I don't, running binaries to frequently slows down tremendously, specially on Windows) ---------------------------------------------------------------------- Henppy · 2014-01-24 01:37 The one thing I miss a lot from Eclipse (yes, I know, Eclipse, Java, sue me ) is perspectives. You can setup a coding perspective and a debug perspective. They change when you start the program and it's wonderful. Because you can have your watch list, call stack, etc. cluttering your desktop ONLY when you're debugging and not editing. That and an really effective docking mechanism like in... well, Eclipse. ---------------------------------------------------------------------- Leledumbo · 2014-01-24 04:48 QuoteThe one thing I miss a lot from Eclipse (yes, I know, Eclipse, Java, sue me ) is perspectives. You can setup a coding perspective and a debug perspective. They change when you start the program and it's wonderful. Because you can have your watch list, call stack, etc. cluttering your desktop ONLY when you're debugging and not editing.Hmm... that could be a nice addition to one of existing docking packages. Rather than specifically like this, I think it's better to create a set of forms to open/close at certain condition. It'll be hard to do though... ---------------------------------------------------------------------- zbyna · 2014-02-20 21:46 Quote from: taazz on January 08, 2014, 04:04:45 amQuote from: Martin_fr on January 07, 2014, 05:53:15 pmOk. But with SynEdit, you can be in 3 (or 4) blocks at the same time: - begin end - ifdef - region - current selection Still it would be a nice feature. An alternative would be cnpack style lines: http://sourceforge.net/projects/cnwizards/ If I get a vote then I would go with the cnpack view I like it a lot better and being used to it from delphi is a plus too . In case of voting +1 ---------------------------------------------------------------------- valdir.marcos · 2014-03-20 16:54 SublimeText has some nice tricks: 1. Use Multiple Selections to rename variables quickly. Here Ctrl+D is used to select the next occurrence of the current word. 2. Make batch edits with Multiple Selections. Here Ctrl+Shift+L is used to split a selection into lines, and each line is then edited simultaneously. 3. The Command Palette gives fast access to functionality. Here Ctrl+Shift+P is used to show the Command Palette, "sspy" (short for Set Syntax: Python) is used set the syntax of the current file to Python. 4. Use Goto Anything to quickly navigate between files, even in the largest projects. Ctrl+P shows Goto Anything, and typing then filters on file and directory names. 5. Goto Anything can also be used to show a function, line or word within a file. Type @ after a file name to filter on symbols. More... 6. Find and Replace with regular expressions. Here unwanted whitespace is removed by using the regex " +" to find groups of spaces, which are then selected simultaneously with the Find All button. You can watch a very fast and small slide showing them on http://www.sublimetext.com/ I have found trick 1 as a Lazarus website Tip of the Day and on http://wiki.freepascal.org/Lazarus_IDE_Tools : Use syncro-edit to update all occurrences of an identifier in a selected part of the source http://lazarus.freepascal.org/images/syneditsyncro.gif The other five already exist and I could not find documentation? ---------------------------------------------------------------------- Martin_fr · 2014-03-20 17:06 1) Lazarus has a "goto next/prev occurrence of current word. You can assign a key to it in the options. No need to select the word. 2) not yet. But macros (record/play) can do a nice job here. There also is syncro edit http://wiki.lazarus.freepascal.org/New_IDE_features_since#Syncron-Edit 6) find/replace has regex in Lazarus too. For the navigation there is codetools. And if you install cody, and look at the identifier dictionary, it can find any function, constant, type .... but not file-name. Also just hit ctrl-space anywhere in the source, to get possible completions. Syntax highlight type (language) can be changed via context menu. ---------------------------------------------------------------------- bylaardt · 2014-03-20 18:28 What i really miss is a formatted comment block with a mark on the gutter when a comment is available for the line. Display or hide the comment with "//" at the end of line can be optional. (or another comments marks) formats like linebreaks, italic, bold, character colors, size links to another .pas file ou url can be make with tags or special chars. But i dont saw those ressources in another pas editor, and this is only to make lazarus better. implementing new stuffs lazarus can stay ahead of n++ or geany. ---------------------------------------------------------------------- Martin_fr · 2014-03-20 18:48 @bylaardt What exactly do you mean? Maybe sound like several features? QuoteWhat i really miss is a formatted comment block There is already a suggestion (but nothing done yet) to do pasdoc highlight. That is tags like @Author, can be highlighted within the comment. That is a highlighter issue. Quotewith a mark on the gutter when a comment is available for the line.No idea what you may mean? QuoteDisplay or hide the comment with "//" at the end of line can be optional. (or another comments marks)I don't think hiding of comment, that are at the end of a line with code is likely. Currently all hiding is either full line, or nothing (though hiding parts of a line, may be useful. Comments that are alone on the line (// { (* ) can all be folded, or hidden. Quoteformats like linebreaksDo you mean word wrap? Linebreaks can be inserted by pressing return key. But that has nothing to do with formatting. Word wrap is on the todo.... Quoteitalic, bold, character colors, size links to another .pas file ou url can be make with tags or special chars.Sounds like pasdoc ? See above. Links are codetool, not highlight. Codetool does already work in comments too. ---------------------------------------------------------------------- taazz · 2014-03-20 19:10 Let me jump in here and say that I vote against highlighting inside comments, after all I have gone out of my way to change the comments color to light gray so it will not interfere with my code reading/analysis I'm not going to start handing down multiple colors on the highlighter so that people can turn their code editor to a word processor, go use open office if you need one of those. Also the current editor is far away from smooth scrolling, huge units (more than 10K of lines) are already jumpy and I need speed when coding not fancy comments. ---------------------------------------------------------------------- Martin_fr · 2014-03-20 19:20 Quote from: taazz on March 20, 2014, 08:10:33 pmLet me jump in here and say that I vote against highlighting inside comments, after all I have gone out of my way to change the comments color to light gray so it will not interfere with my code reading/analysis If so, it would be completely optional, and either off by default, or turn off with one click. Or maybe the choose between 2 highlighters. One with, and one without. As indicated, you can hide all comments, except those that are at the end of a line. Right click the fold gutter, and select "hide all comments" QuoteAlso the current editor is far away from smooth scrolling, huge units (more than 10K of lines) are already jumpy and I need speed when coding not fancy comments. The highlighter does not scan, when you scroll. So if scrolling slows down for you dependent on the file size, then it is not the highlighter. Try to switch off the overview gutter. That could be causing a problem. In very rare cases, it could also be the "top info hint" (the hint that shows the current class/procedure name, on top of the editor, if it is not in view. Though that is normally quite fast. But if your procedure opening line is some several thousand lines above, ....  What OS/widgetset is this happening? ---------------------------------------------------------------------- taazz · 2014-03-20 19:50 I'm working with windows 32bit. The jumpy behavior is only visible when I use the arrows to scroll up and down (on 1.0.14 haven't made the transition to 1.2 yet) and it just pauses on what it seems standard intervals  (ee every 2 seconds more or less). I haven't made any complains or bug reports because I"m using a netbook with pure performance, (see attached image to get an idea) so although it might be a good speed testing environment it is not the average developing machine and can't be used as bases for comparison. To put things in to perspective the disk drive on my laptop is a 5400 rpms one. ---------------------------------------------------------------------- Martin_fr · 2014-03-20 20:22 Well, * if* it is disk swapping, then that would explain it. Depends on how much memory you have, and how many other files are open. Then again, just open the task manager, and watch the CPU usage? QuoteI use the arrows to scroll Jut the arrow keys, or the arrow keys with the ctrl key? There can be a huge difference. If you use just the arrow keys, then the caret is at the last line, while you hold the down key, and new line appear at the bottom. If you use the ctrl arrow key, then the caret will be at the top line, while you hold ctrl+down keys, and new line appear at the bottom. If you have a highlight for the current line (the line with the caret has a different background color, then this causes both top and bottom line to be invalidated. And Invalidation is expanded to the minimum enclosing rectangle, meaning the entire clientarea of synedit. Normally scrolling just copies the existing visible bitmap, and paint one line that scrolled in. Except for the described case, in which scrolling keeps repainting (textout) the entire screen. You will also note, that there may be extra cpu load, when the hint on top (top info hint) changes, as it causes extra invalidation. The same happens, if, while scrolling, the caret touches a "begin" or "end" or "(", ")", which causes the matching opening/closing token to be invalidated (for highlight). Finding, and invalidating is cheap. But it sets the minimum enclosing invalidated rectangle to a bigger part of the screen, causing extra painting. ---- Note, that this are none static highlights (the change when the caret move). Static highlights, do not affect scroll speed in this manner. However, of course, if a full repaint is needed, then it will depend, on the amount of times the color changes in each line. So coloring each letter in a separate color will mean lots of extra calls to the OS API. But just having one or two words (per line) more or less in different colors, will not be noticeable. ---------------------------------------------------------------------- taazz · 2014-03-20 20:37 Quote from: Martin_fr on March 20, 2014, 09:22:19 pmWell, * if* it is disk swapping, then that would explain it. Depends on how much memory you have, and how many other files are open. Then again, just open the task manager, and watch the CPU usage? see attached image those are my average values in my daily routine and my mp3 player is off now which is usually on when I'm working with code. Quote from: Martin_fr on March 20, 2014, 09:22:19 pm QuoteI use the arrows to scroll Jut the arrow keys, or the arrow keys with the ctrl key? just pressing the down arrow (no control) it pauses every 2 seconds and it takes around 5 or 6 seconds to scroll to the end of a 2000 lines unit. Again not your average computer so can't complain about lazarus really. ---------------------------------------------------------------------- Martin_fr · 2014-03-20 21:02 Not sure how process explorer uses the colors. But looks like both CPU and ram are tight? 6 seconds to scroll 2000 lines? With arrow down? line by line? That is fast. Or do you mean page down? (Takes 3 to 4 sec here, with page down). Well anyway. It would be a lengthy process to find out, and guessing wont help. If you want to try, switch off the "overview gutter" (the more likely canditate), and or the "top info hint" ("show class proc hint"), and see if it makes a difference. ---------------------------------------------------------------------- taazz · 2014-03-20 21:15 Quote from: Martin_fr on March 20, 2014, 10:02:07 pmNot sure how process explorer uses the colors. But looks like both CPU and ram are tight? Too tight, forget the colors 100% is the top of the graph, for cpu and memory at least, everything else seems that they have decorative role. Quote from: Martin_fr on March 20, 2014, 10:02:07 pm6 seconds to scroll 2000 lines? With arrow down? line by line? That is fast. Or do you mean page down? (Takes 3 to 4 sec here, with page down). that is an educated guess it might be even longer haven't done any measurement, accurate or otherwise, mainly because the scroll speed has to many variables including (but no limited) the key repeat rate set on the system, in any case it feels slower than d2007 on the same system with cnpack installed (with the begin end pairing expert on that draws a line inside the code editor on different colors etc). Quote from: Martin_fr on March 20, 2014, 10:02:07 pmWell anyway. It would be a lengthy process to find out, and guessing wont help. If you want to try, switch off the "overview gutter" (the more likely canditate), and or the "top info hint" ("show class proc hint"), and see if it makes a difference. overview gutter is always off I'll also close the class/proc hint and test again but I need a more accurate measurement method. I'm thinking on using an external timer for starters I just need some time to set things up and I'll post measured data in a couple of days if I could find an millisecond timer. ---------------------------------------------------------------------- Martin_fr · 2014-03-20 22:12 ANd check out the process explorer, it must have a counter for swapping (IIRC page faults) --- Also: can you send your editoroptions.xml ? Just for curiosity. So I can compare, how they perform here. ---------------------------------------------------------------------- taazz · 2014-03-21 00:22 Quote from: Martin_fr on March 20, 2014, 11:12:13 pmANd check out the process explorer, it must have a counter for swapping (IIRC page faults) --- Also: can you send your editoroptions.xml ? Just for curiosity. So I can compare, how they perform here. Hear is a fast screen grab not much in code editing in there but heavy system usage, also the xml you asked for. I'm assuming that attaching the memory tab only in future posts should suffice. I'm going to make sure that the metrics will be from my coding hours in my measured posts. ---------------------------------------------------------------------- Martin_fr · 2014-03-21 00:48 Wrong page. See attached. The column may need to be enabled in the config first. If you switch to Lazarus there will be page faults. Also the first one, maybe even 2 times you scroll through a file. But when you scrolled (twice) through the entire file, the counter should stop increasing, while you can keep scrolling. (You may need to ignore the occasional 1 up (literal just ONE), every few seconds. But if it keeps going up in bigger steps, then it is due to not enough memory. Also, see if there is a different in scroll speed, between the first time you scroll, and the 3rd or 4th. ---- edit / ps: I tested your options, they work same speed as mine. So probably not an issue based on options. ---------------------------------------------------------------------- bylaardt · 2014-03-24 14:02 martin_fr, when i say to hide the comments , my point is to make the code more clear to read, and put marks on the gutter to read this hide comments. the image say  what i think: Code: [Select]function CalculaExpressao(Formula: string; DataSet: TObject = nil; Controle: TObject = nil;Parametros: TObject = nil): string; var    tempDataDest,    TempParametros,    TempControle: TObject;    Exp:TExpressao; begin    Exp:=TExpressao.create(Calcular);    exp.OnErro:=@Calcular.ExpErro;    exp.OnFuncao:=@Calcular.ExpFuncao;//calculate personal functions/njust semicolon to separate parameters    Exp.OnVariavel:=@Calcular.ExpVariavel;//alternate the variable value into the expression    tempDataDest := Calcular.DataSet;    TempControle := Calcular.Controle;    TempParametros := Calcular.Parametros_gerais;    Calcular.DataSet := DataSet;    Calcular.Controle := Controle;    Exp.Expressao := Formula;    Result := Exp.calcular;    Calcular.DataSet := tempDataDest;    Calcular.Controle := TempControle;    Calcular.Controle := TempParametros;    Exp.free; end; ---------------------------------------------------------------------- Martin_fr · 2014-03-24 14:35 Ok, I see what yo mean. Nice idea. But currently still far away. ---------------------------------------------------------------------- taazz · 2014-04-09 10:49 Quote from: Martin_fr on March 21, 2014, 01:48:16 amWrong page. See attached. The column may need to be enabled in the config first. If you switch to Lazarus there will be page faults. Also the first one, maybe even 2 times you scroll through a file. But when you scrolled (twice) through the entire file, the counter should stop increasing, while you can keep scrolling. (You may need to ignore the occasional 1 up (literal just ONE), every few seconds. But if it keeps going up in bigger steps, then it is due to not enough memory. Also, see if there is a different in scroll speed, between the first time you scroll, and the 3rd or 4th. ---- edit / ps: I tested your options, they work same speed as mine. So probably not an issue based on options. I'm back after a few weeks with no computer. The laptop of the previous tests gave up on me its disk simple stopped responding even plugged in would freeze the laptop at start up too (no boot beyond the start up bitmap). Now I have a different laptop which doesn't seem to have those problems but I didn't had the time to complete my dev environment installation yet.