idanarye / vim-dutyl

Coordinate D tools to work together for you
http://www.vim.org/scripts/script.php?script_id=5003
79 stars 13 forks source link

How to enable dfmt support? #13

Closed theSuess closed 9 years ago

theSuess commented 9 years ago

I saw that it is able to format the code using dfmt but there is no "how to" in the readme.

idanarye commented 9 years ago

The full documentation is not in the README.md - it's in doc/dutyl.txt. You can access it with :help dutyl(you'll need to generate helptags first - with Pathogen it's done via the :Helptags command). Here are the relevant sections:

FORMATTING                                                *dutyl-formatting*

Formatting is done using dfmt and invoked automatically or by using Vim's |gq|
operator. dfmt read it's option using .editorconfig files, so you can't and
don't need to configure the style from Dutyl.

INDENTATION                                              *dutyl-indentation*

Indentation is done using dfmt and invoked automatically or by using Vim's |=|
operator. Note that Vim's indent works by evaluating 'indentexpr' for each
line, so indenting many lines at once can be slow since it needs to invoke
dfmt many times.