Difference between revisions of "D in Vim"

From D Wiki
Jump to: navigation, search
(Replaced DCD plugin info with Dutyl (since the DCD plugin has been deprecated in favor of Dutyl))
Line 25: Line 25:
 
* Copy the d.snippets file to UltiSnips user snippets directory. On Linux this should be ~/.vim/UltiSnips. <br/><br/> If you don't know where the user snippets directory is, open a D file and type the :UltiSnipsEdit command (after UltiSnips is installed); this will open a user d.snippets file which you can replace by the DSnips version of d.snippets.
 
* Copy the d.snippets file to UltiSnips user snippets directory. On Linux this should be ~/.vim/UltiSnips. <br/><br/> If you don't know where the user snippets directory is, open a D file and type the :UltiSnipsEdit command (after UltiSnips is installed); this will open a user d.snippets file which you can replace by the DSnips version of d.snippets.
  
=DCD=
+
=Dutyl=
The [https://github.com/Hackerpilot/DCD/ D Completion Daemon] has support for VIM. Installation instructions can be found in [https://github.com/Hackerpilot/DCD/tree/master/editors/vim this README file]
+
The [https://github.com/idanarye/vim-dutyl Dutyl] plugin integrates D tools such as [https://github.com/Hackerpilot/DCD/ DCD], DUB and DScanner to provide autocompletion, syntax checking, documentation search and more features.
  
 
=Installing Vundle=
 
=Installing Vundle=

Revision as of 02:36, 15 November 2014

Vim features and plugins useful for D coding.

UltiSnips

UltiSnips is a Vim snippet plugin with D support. It makes it possible to complete tasks such as writing a loop, wrapping code in try/catch or adding an operator in a few keystrokes.

Installing UltiSnips:

  • Make sure you have a plugin manager such as Vundle installed.
  • See the Quick Start section at UltiSnips site.

DSnips

DSnips screenshot1.gif DSnips screenshot2.gif

DSnips is a (greatly) improved version of UltiSnips D snippets. It covers almost all D features and its snippets are designed to work together (e.g. can be used within one another or in chains). See DSnips reference

Installing DSnips:

  • You need to have UltiSnips installed first.
  • git clone https://github.com/kiith-sa/DSnips.git
  • Copy the d.snippets file to UltiSnips user snippets directory. On Linux this should be ~/.vim/UltiSnips.

    If you don't know where the user snippets directory is, open a D file and type the :UltiSnipsEdit command (after UltiSnips is installed); this will open a user d.snippets file which you can replace by the DSnips version of d.snippets.

Dutyl

The Dutyl plugin integrates D tools such as DCD, DUB and DScanner to provide autocompletion, syntax checking, documentation search and more features.

Installing Vundle

Many Vim plugins require a plugin manager for installation. Vundle is one such plugin manager.

To install Vundle see the Quick Start section on Vundle's site.