Last update November 30, 2012

Editor Support /
Vim Editor



Webpage

As of version 6.3, D syntax highlighting is included in the main distribution. There may be newer versions on the vim.org scripts page or on the development site.

Make and error formats

for DMD: set errorformat+=%f(%l):\ %m

You can also set up a "make" program like this: set makeprg="rebuild\ %\ -c\"

Using ctags and the taglist plugin

You can download the ctag binary patched with D support from this wiki page: ReferenceForTools/ExuberantCtags

Make sure your ctag binary is in your path, or otherwise callable from a shell/command prompt.

The Taglist plugin can be downloaded from: http://vim.sourceforge.net/scripts/script.php?script_id=273

You will need to add a variable to your vimrc file, and provide some formatting options. Furthermore, you will need to activate filetype detection. Here's what your vimrc might look like:

  1. filetype on
  2. filetype plugin on
  3. autocmd BufNewFile,BufRead *.di setfiletype d
  4. let tlist_d_settings='d;c:classes;d:macro definitions;e:enumerators'
  5. nnoremap <silent> <F2> :TlistToggle<CR>
You might want to change the keybinding for TlistToggle to suit your needs. The complete list of formatting options for the D language can be shown by calling ctags --list-kinds=d. For more on extending taglist, refer to: http://vim-taglist.sourceforge.net/extend.html

You should now be able to call :TlistOpen with some D files opened in Vim.

Using Cscope

See ReferenceForTools/Cscope

Bugs

Development of d.vim now occurs on GitHub's d.vim site where there is a bug tracking system and a more open development process. Releases will still be placed on the vim scripts page, but now contributions can be much more easily managed in the open for all to partake.

FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: November 30, 2012 15:52 (diff))