Last update December 2, 2003

DWiki /
Editor Support



Here's an alphabetically-sorted list of editors that can be wrangled into supporting D.

Crimson Editor

Extract the files from {{/crimson.zip}}. Put d.key and d.spc in the "Program Files\Crimson Editor\spec" directory. Put extension.d in the "Program Files\Crimson Editor\link" directory.

Select "Tools/Preferences..." from the main menu and add items for D in these categories: File/Syntax

  • Description: D
  • Lang Spec: D.SPC
  • Keywords: D.KEY
File/Filters
  • Description: D Files
  • Extensions: *.d
  • Default Ext: d

DEdit

The DIG Library has a basic sample editor called dedit that, of course, comes with D support builtin. It also highlights inline assembly properly.

EditPlus 2

To setup this shareware editor, first save {{/d.stx}} to your EditPlus installation directory (such as "\Program Files\EditPlus 2"), then open the program and open Tools/Preferences. Switch to Files/Settings & syntax, and press the "Add" button. Enter "D" in the "Description", and "d" in the "File extensions". Click on the "..." button beside "Syntax file" and select the "d.stx" file you saved. Hit OK; files with a "d" extension should now be properly highlighted.

Emacs

For D support on Emacs 21.1 or above, get unzip {{/d-mode.zip}} into your emacs site-lisp directory and follow the instructions in the d-mode.el file to compile the file and add the proper auto-load setup to your .emacs file. It requires cc-mode and font-lock.

Jen's File Editor

To setup this editor, run it once and open the jfe.ini file it creates in the directory its executable is in. Search for "[SyntaxTemplates]" and add a line reading "templateN=D", where "N" is one above the highest number in that section (for example, if the last line is "template1=HTML", you'd add a line reading "template2=D".) Then append the contents of this file: {{/jfe.ini}}. Opening a file with a .d extension should now syntax highlight properly.

Microsoft Visual C 6.0

You can create .d files using the "C++ Source File" type to get reasonably good editing and syntax highlighting support. If you open a file that already exists, you can change the type by right-clicking in the source window, selecting Properties, and changing the Language drop-box to C/C++. Create new projects using the "Utility Project" type to minimize interference.

For compilation, I've bound a key to run a tool that I use throughout my projects; \dmd\bin\make is a good one. To do that, go into Tools/Customize and click on the Tools tab. Add an entry that runs your program (be sure to put "$(WkspDir)" in the "Initial directory" edit box), then exit this dialog and check out what number its icon has in the Tools menu. Now go back into Tools/Customize and click on the Keyboard tab. Switch the Category to Tools and click on the UserToolN, where N is the number your tool got in the Tools menu. Click in the "Press new shortcut key" edit box, hit the shortcut to run the tool (I like Control-Tilde), and click on the Assign button, then dismiss the dialog. Pressing that will now run your tool.

TextPad

To configure TextPad for D

  1. Copy {{/dlang.syn}} to the TextPad system directory
  2. Under the menu option Configure select New Document Class...
  3. Enter a document class name such as D Language.
  4. Enter file mask like *.d.
  5. Select dlang.syn from the drop down list.
  6. Under the menu option Configure select Preferences...
  7. Go to the D Language section and set up your color preferences.

(From DWiki, http://dlanguage.netunify.com/38)
FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: December 2, 2003 6:06 (diff))