Editing Delphi Code on a Mac

  

Over the last year, there has been an increasing push in the development of source code editors and even full development environments based on portable code and available on multiple platforms, including Mac OS X. Here are some notes about my experiments with Object Pascal enabled editors on the Mac.
As a side note, most of this editors are based on HTML + JavaScript (and variations like TypeScript), but there are some exceptions. And before you ask, Embarcadero is not currently officially endorsing any of these solutions, but we are looking into this area to understand how valuable this would be for Delphi (and C++) developers.
Visual Studio Code
Microsoft entrance into the area of cross platform hosted development tools made a significant splash last year. Visual Studio Code is a very interesting project, mainly oriented to development with scripting languages and web technologies, but with capabilities that go well beyond those of an editor. While not a replacement of Visual Studio for C# development, it works pretty well on Mac OS X and has a couple of Object Pascal language extensions (among many others). Being backed by Microsoft, makes this project highly visible. Some links:

The main Visual Studio Code page is at code.visualstudio.com/

The OmniPascal plugin is available at https://marketplace.visualstudio.com/items?itemName=Wosi.omnipascal and more information is available on the project web site at www.omnipascal.com/. The main limitation is that all of the features beyond syntax highlighting currently work only on Windows (and they also don’t support fhe full Delphi Object Pascal language)
The simpler Language Pascal plugin offers only core features and is available at https://marketplace.visualstudio.com/items?itemName=alefragnani.pascal.

Below is a screenshot of some Delphi code on my Mac in Visual Studio Code.

Atom
Another very interesting open source and cross platform editor is Atom, which is backed by GitHub. Atom is more of an editor than a full development environment, is focused on customization (or hack-ability), and is extremely fast. There are Object Pascal language bindings also for it (done by the same developer of the Pascal VSCode plugin). Links:

Atom main site is at atom.io/

A very nice overview is at www.jonobacon.org/2015/11/16/atom-my-new-favorite-code-editor/

Atom Pascal bindings can be found at github.com/alefragnani/atom-language-pascal

And here is a screen shot, with the same Delphi source code file.

Trolledge
This is not such a popular editor, but a very interesting one for me. In fact, rather than in JavaScript/HTML technologies it is written in Delphi and uses FireMonkey for the user interface. Trolledge comes natively with Delphi support, and it is available (not surprinsingly) for Windows and Mac. It does support many different programming languages, though, from JavaScript to C#. Links:

Trolledge site is www.trolledge.com/

The source code repository is at github.com/FMXExpress/Trolledge

As you can see in the image below, opening a form automatically opens the matching designer in a second text editor. This is the only editor with a core knowledge of Delphi and its language and architecture.

What’s Your Take?
So, what’s your take on these editors and IDEs? I end up using Delphi code editors on the Mac almost only for reading code, as writing in the Delphi editor is significantly better. But I increasingly use these editors for my HTML and JavaScript work. While the lack of designers and other integrated tools severely limits their scope, for the developer who are focused mostly on code writing and those using operating systems other than Windows, these editors can be handy.
Have you used any and what’s your experience? Which one do you like most? And do you think taht Embarcadero as a development tools company should invest in this area alongside with improving and modernizing the RAD Studio IDE on Windows? 

Comments are closed.