Editors and IDEs

Most programmers have a preferred text editor or integrated development environment. Take a look inside the D community and you'll find a variety of preferences. This has led to a number of volunteer efforts to add support for D syntax highlighting to existing editors, or plugins for existing IDEs that provide a complete D building and debugging environment. This section highlights some of the cross-platform options used in the D community, but it is by no means an exhaustive list. More options can be found at the DWiki.

Text editors

There are a number of text editors, both commercial and free, which support D syntax highlighting either natively or through community-driven plugins.

Vim and Emacs

Many D programmers come from the Linux world, where editors like Vim and Emacs have a long tradition. Users of these editors coming to D need not fret, as support exists for both. A DWiki page at http://wiki.dlang.org/D_in_Vim lists a few resources for Vim users and a package for syntax highlighting can be found at https://github.com/JesseKPhillips/d.vim. The package is already included in Vim, but the latest updates can always be found on the GitHub page. Another interesting package for Vim users is Dutyl, a collection of D utilities, which is available at http://www.vim.org/scripts/script.php?script_id=5003.

Emacs users can find a major mode for D at https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode. Additionally, there is a version of MicroEmacs that supports D. It's maintained (and used) by D's creator, Walter Bright, at http://www.digitalmars.com/ctg/me.html.

Textadept

Textadept is an open source text editor with built-in support for D syntax highlighting. It also ships with built-in support for compiling with DMD. It's highly configurable via the Lua scripting language and comes in the form of multiple executables, one of which is a terminal version of the editor. You can read more about Textadept and download a copy for your platform at http://foicica.com/textadept/.

Sublime Text

Sublime Text is a commercial multi-platform text editor with support for a number of programming languages, including D. Syntax highlighting for D is built-in, along with support for compiling with DMD. Plugins adding auto-completion exist and the editor can be further extended with Python, adding support for other compilers or build tools like LDC or DUB. It's available at http://www.sublimetext.com/. If Sublime Text is your editor of choice, be sure to ask around in the #D IRC channel for information about useful plugins for D.

Sublime Text

IDEs

In the past, Integrated Development Environments tended to support only one language. Today, most popular open source and commercial IDEs support multiple languages, usually through a plugin system. Sometimes the plugins ship with the IDE, sometimes they must be downloaded separately, and often they are developed by third-parties. Here, we're going to look at three plugins for three major IDEs, plus one open-source IDE that ships with support for D included.

Visual D

If you work for a company that develops any sort of software for Windows, chances are you are using a version of Microsoft Visual Studio at the office, perhaps even at home. Support for D can be added to several versions of Visual Studio through the Visual D plugin available at https://github.com/D-Programming-Language/visuald. It supports DMD, GDC, and LDC. It also comes with two debugging options. One is the Mago debugger, a tool developed specifically to work with D-style debug output. The other is a conversion tool, called cv2pdb, which translates DMD's CodeView debug output into the PDB format recognized by the modern Microsoft debugger. Both options allow debugging directly in the IDE. On a side note, DUB supports generating Visual D project files from a DUB project configuration.

Mono-D

Mono-D is a plugin for MonoDevelop/XamarinStudio. It supports a number of toolchains, including DMD, GDC, LDC, DUB, RDMD, and Make. DUB projects can be opened directly in the IDE. It also supports loading Visual D projects. You can read more about it and find download links and installation instructions at http://wiki.dlang.org/Mono-D.

DDT

DDT is a plugin for the open source Eclipse IDE. It has built-in support for DUB such that elements of the package configuration are listed in the Project Explorer. Debugging with GDB is supported via integration with the Eclipse CDT plugin (for C and C++ development). Eclipse users moving to D should point their browsers at http://ddt-ide.github.io/ for more info on obtaining and using DDT.

Code::Blocks

Code::Blocks is an open source, cross-platform IDE. Though it's billed as an IDE for C, C++, and Fortran development, it also supports D. This includes support for debugging with GDB. For instructions on how to configure Code::Blocks for D development, refer to http://wiki.dlang.org/CodeBlocks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.14.132