www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - New Vim syntax and indent files

reply Jason Mills <jmills cs.mun.ca> writes:
Some Vim/GVim updates for D:

First version (0.1) of an indent file (used by vim for auto indent 
specific to D). (http://www.vim.org/scripts/script.php?script_id=1389)

New version (0.14) of the syntax file. 
http://www.vim.org/scripts/script.php?script_id=379

Jason
Oct 29 2005
parent reply =?utf-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= <araelx gmail.com> writes:
On Sun, 30 Oct 2005 02:40:31 +0200, Jason Mills <jmills cs.mun.ca> wrote:

 Some Vim/GVim updates for D:

 First version (0.1) of an indent file (used by vim for auto indent  
 specific to D). (http://www.vim.org/scripts/script.php?script_id=1389)

 New version (0.14) of the syntax file.  
 http://www.vim.org/scripts/script.php?script_id=379

 Jason
May I ask how does this indent file differs from standard vim intendation? Regards,
Oct 31 2005
parent reply Jason Mills <jmills cs.mun.ca> writes:
Dawid Ciężarkiewicz wrote:
 On Sun, 30 Oct 2005 02:40:31 +0200, Jason Mills <jmills cs.mun.ca> wrote:
 
 Some Vim/GVim updates for D:

 First version (0.1) of an indent file (used by vim for auto indent  
 specific to D). (http://www.vim.org/scripts/script.php?script_id=1389)

 New version (0.14) of the syntax file.  
 http://www.vim.org/scripts/script.php?script_id=379

 Jason
May I ask how does this indent file differs from standard vim intendation? Regards,
Currently, this indent file simply turns 'cindent' option on when a D file is loaded. In vim help see the cindent option. Basically, this enables automatic indenting when typing in insert mode. For example, after typing a { and pressing enter, the cursor indents the next line automatically (according to your tab/space indent options). You can also use = to realign selected text according to the cindent style. If you have vim configured to turn on 'cindent' regardless of file type, you will see no difference. This might be the "standard vim indentation" you are talking about. Additionally, you may have vim configured to ignore cindent. Again see vim help. I hope to update the indent file later with more D specific indent styles (the current file assumes the C language). Jason
Oct 31 2005
parent reply Dawid =?ISO-8859-2?Q?Ci=EA=BFarkiewicz?= <dawid.ciezarkiewicz gmail.com> writes:
Jason Mills wrote:
 Currently, this indent file simply turns 'cindent' option on when a D
 file is loaded. In vim help see the cindent option. Basically, this
Oh. So nothing new for me.
 I hope to update the indent file later with more D specific indent
 styles (the current file assumes the C language).
That'd be something, but I hardly can see places where standard vim indentation could be better. The one I remember is dealing with protection attributes in classes (w/o {} and such}. I've got my Vim configured to walk almost perfectly with DMD (:mak :cn are working, Ddoc comments are nice placed). But if something could be still improved I'd be interested. Regards, -- Dawid Ciê¿arkiewicz
Nov 01 2005
parent Frank Benoit <benoit__ __tionex.de> writes:
 That'd be something, but I hardly can see places where standard vim
indentation could be better. the one I remember is dealing with protection
attributes in classes (w/o
{} and such}. I've got my Vim configured to walk almost perfectly with DMD (:mak :cn are working, Ddoc comments are nice placed). But if something could be still improved I'd be interested. I have problems with the ddoc indention. Would you like to share your configuration?
Apr 02 2006