[lazarus] Itch to scratch

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Dec 10 06:03:37 EST 2001


On Sun, 9 Dec 2001 19:20:29 +0200
"Jarto Tarpio" <jarto at starsoft.fi> wrote:

> The IDE has really improved a lot. Especially the source editor. It's 
> fast as lightning.

Thx. Although it can be much faster. The LCL is currently not clipping, the syntax highlighting creates and destroys far too many strings with every repaint, and the search and replace is also not optimized.


> Open file at cursor is not implemented yet, so I decided to give it a 
> try to see if I could be of help. After a few hours of reading old 
> code, I'm sure I could implement that.

What old code?


> There seems to be two functions that are used for finding the word 
> under the cursor: GetWordFromCaret and TextUnderCursor. These 
> two should maybe be combined?

I removed TextUnderCursor, since it was not used. You can use GetWordFromCaret, although I think, the code should be changed. TSourceEditor.StartFindAndReplace uses 

with EditorComponent do
  s := GetWordAtRowCol(CaretXY);

which returns the word at the cursor, considering the current highlighter.



> Anyway, these won't work with include files as both stop at a dot.

And include files and units depends on the corresponding search path. So, a simple word at cursor function will not work for many fpc/lcl sources. The codetools will know about the search paths as soon as I finished the codetool editor.


> Interestingly enough, 
> uniteditor.pas also contains OpenAtCursorClicked, which is 
> commented out. So someone is maybe already working on this?

Yes, Shane did, a long time ago. No one is currently working on that. 


> Feel free to give me something to work on. I'm not familiar with 
> GTK-programming, but I could give a helping hand with the IDE.

Great!
If you don't know, where to start, here are some features, which don't need gtk and should also be easy enough to start:

-Find Text History (see Moleskine)
-Makefile and bash hilighting
-Find in files
-MessageDialog Editor (see GExperts)
-Backup Project to directory
-compare files (diff output)
-Macro Start: Ctrl-Shift-R, End: Ctrl-Shift-R, Play: Ctrl-Shift-P
 (see official synedit cvs)
-Incremental Search:  Ctrl-E
    +typed letters in statusbar
-Colors for Object inspector


Mattias






More information about the Lazarus mailing list