Allow folding code with vim
Jesse Phillips
jessekphillips+D at gmail.com
Sat Jun 23 17:45:54 PDT 2012
On Saturday, 23 June 2012 at 16:40:16 UTC, bioinfornatics wrote:
> hi,
>
> with vim you can fold unfold command to do this you need to ad
> to d.vim
> these lines
>
> " Folding
> syn region dFold start="{" end="}" transparent fold
> syn region dOnelineCondition
> start="\<if\>\|\<else\>\|\<else\s\+if\>"
> end=";" contains=ALL containedin=ALL transparent fold
> syn region foldDdoc1 start="/\*\*" end="\*/" keepend
> transparent fold
> syn region foldDdoc2 start="/++" end="+/" keepend transparent
> fold
>
>
> and into /.vimrc add
> set foldmethod=syntax
>
> vim folding in
> - French:
> http://qanuq.com/index.php?post/2009/04/13/Utiliser-les-replis-%
> 28folding%29-de-Vim
>
> - English: http://vim.wikia.com/wiki/Folding
Folding was added with this commit.
https://github.com/JesseKPhillips/d.vim/commit/bc5fd07cddb76407ef441c3ed5fe6c9054e630d6
Though it doesn't do anything special for doc comments or if/else.
I don't use code folding so I don't know what is appropriate, but
the github page is the place to add items that should go back
upstream.
If you can explain what this adds over what already exists it
would probably be easier to decide if appropriate and test.
More information about the Digitalmars-d
mailing list