14
votes

I work in Delphi 2007 (both win32 and .Net) but the CodeGear IDE frequently annoys me, so if possible I'd like to find a replacemnt.

We have a build script so I can compile from the command line and I very rarely do any GUI designing, so the only thing I need is a text editor (with syntax highlighting, Autocomplete/Intellisense ...).

I would like to use Visual Studio or Emacs but don't know how feasible it is to work on Delphi code in those environments. Particularly debugging - can the Delphi IDE still act as my debugger even if I don't use it for editing?

Does anyone have any experience of breaking away from RAD studio?

P.S. I am aware of the new Delphi Prism but that won't solve my problems - I still need to work in vanilla Delphi and use the Delphi 2007 compiler.

12
Out of curiosity, what annoys you about the D2007 IDE so much that you want to find a replacement? I supposed I'm just weird, but I like the Delphi IDE better than VS2005 and VS2008.Mick
I'd like to know what annoys you as well - and I can even do something about it, since I'm the Delphi Product Manager. ;-)Nick Hodges
And Mick, you are not weird. ;-)Nick Hodges
My main problem I suppose is the length of time it takes to load up the IDE (~30 seconds: Pentium 4, 2GB RAM), and then the delay every time I invoke code completion (which is most jarring as it halts my flow every few seconds - and prevents me from typing anything - until the symbols are loaded)Mark Pim
Undo is also broken (at least in d2007) - I've just tried to undo a bit of typing - first nothing happened for the first few undos, then it got rid of my WHOLE comment that I was writing and disabled redo so I had to type it all again.Mark Pim

12 Answers

3
votes

You can of course edit source files outside of the Delphi IDE. When you switch back to the IDE it will notice that files have been changed outside of it, and ask you whether to reload them (if they are currently opened in the editor). This is a safe thing to do if you never edit inside the IDE, but to keep the confirmations from appearing it is best to not have source files open in the Delphi editor at all while you edit them in emacs.

Even if you use a custom build script and build the project from emacs you should still keep the project file up-to-date. When you use the debugger in the IDE it will usually first compile the project. To have this always work (even with visual form or frame inheritance) a correct project file is crucial. It is also important for debugging when you have several source files with the same name in different directories that are in your search / browse path, or if you have not all your source directories in the search / browse path.

Whatever tools you use for editing or otherwise changing your source files, make sure that you always have DOS style CR+LF line endings (\r\n, #13#10) in all lines, as LF only (\n, #10) tends to confuse the IDE - you will notice that the blue dots in the debugger are out of sync with the source lines, and that compiler error line numbers are wrong. Using sed or awk on source files can be a big time saver, but be sure to use the tools compiled for Win32, and not those provided with (for example) the cygwin environment.

9
votes

One thing you can do is to put in GExperts to make your life better. alt text
(source: gexperts.org)

alt text
(source: gexperts.org)

4
votes

Emacs does appear to have a Delphi editing mode, which is probably a good starting point if you're trying to get up and running.

3
votes

I do know that the FreePascal editor called Lazarus can be a nice replacement.

Although it's not compatible with the VCL, so it would only be feasibly for a new project.

3
votes

If your main problem is the low speed of Delphi 2007 IDE, then use DelphiSpeedUp.

2
votes

I use CodeFactor, but unfortunately it's no longer available.

Delphi 2009 is a pretty big improvement, even over Delphi 2007, so if you've got the means, that might help a lot.

2
votes

If you have Delphi 2009 and it is not annoying to you, try Andy's IDE Compiler Plugin 1.0
It can be used to compile a Delphi 2007 project with the Delphi 2009.

2
votes

See free OPEditII, at codefactor2.com [the page is no longer available and presents spam instead] It sounds like the free and updated version of the late codefactor. Worth saying it works like a charm under Windows Seven 64 bits, and is very fast, with integrated Delphi code parser. So you have a class browser, code completion, code navigation from interface to implementation, and a lot of code refactoring tools.

1
votes

Have a look at Multi Edit – It is a fantastic editor and has support for the Borland products

1
votes

You should try TSEPro (aka QEdit) from Semware. It has support for the language, a very powerful macro system and supports compiling from inside the editor via bcc32.

0
votes

One option is EditPad Pro. I haven't tried the product, but I know the vendor is reliable.

0
votes

ConText or EditPad Pro both offer syntax highlighting for Delphi code, as do many other programmers editors (they sometimes call it Pascal though). I've used both of those though, and they work really well. I use them when I want to open code fragments or samples.

They both have a nice feature of being able to associate specific commands with certain file types. So you could associate the Delphi command-line compiler or your build script with your source files to allow you to build, run unit tests, etc. from there. I've done similar with other command line compilers, but frankly I really like the Delphi IDE so have had no need to try to replace it.