On Tue, Aug 10, 2010 at 4:25 PM, Benjamin R. Haskell v...@benizi.com wrote:
I do something similar for PHP with this file:
= ~/.vim/after/syntax/php.vim =
syn region phpComment start=+/\*+ end=+\*/+ contained extend
contains=phpTodo fold
===
For this,
Hi Benjamin,
First sorry for top reply on mobile gmail.
I've totally got it.
Many thanks to your clear presentation.
Wayne
On 8/11/10, Benjamin R. Haskell v...@benizi.com wrote:
On Wed, 11 Aug 2010, Wayne wrote:
On Tue, Aug 10, 2010 at 7:35 PM, Benjamin R. Haskell wrote:
Sorry, I should
Hi there,
I have found a way to do it.
I add following line into the cpp.vim syntax file:
syn match comment \v(^\s*//.*\n)+ contains=cComentGroup fold extend
Then when open a cpp file, all consecutive // comments will auto folded
under syntax foldmethod.
The problem:
To change a syntax file is
On Tue, 10 Aug 2010, Wayne wrote:
Hi there,
I have found a way to do it.
I add following line into the cpp.vim syntax file:
syn match comment \v(^\s*//.*\n)+ contains=cComentGroup fold extend
Then when open a cpp file, all consecutive // comments will auto folded
under syntax
I do something similar for PHP with this file:
= ~/.vim/after/syntax/php.vim =
syn region phpComment start=+/\*+ end=+\*/+ contained extend
contains=phpTodo fold
===
For this, you'd want to create the file (and directories, if they don't
On Tue, 10 Aug 2010, Wayne wrote:
I do something similar for PHP with this file:
= ~/.vim/after/syntax/php.vim =
syn region phpComment start=+/\*+ end=+\*/+ contained extend
contains=phpTodo fold
===
For this, you'd want to create
On Tue, Aug 10, 2010 at 7:35 PM, Benjamin R. Haskell v...@benizi.com wrote:
Sorry, I should have been more explicit. That's what I'm doing above.
Note the path of the files:
~/.vim/after/syntax/
The '~' indicates my home directory, so that's in my personal .vim
directory. Based on the
Hi there,
I have a c++ source file, in which there are paragraphs of comments before
each function to describe it.
I'm used to syntax foldmethod, which can fold the comment of style /*...*/.
But it can't fold the comment like,
//...
//...
//...
I don't want to use plugin if any.
Could I write
Hi Wayne
Can you do something with a fold expression?
Assuming that a fold expression works as an extra mode when syntax
foldmethod is on.
Or something like done in
http://vim.wikia.com/wiki/Syntax-based_folding
I'm a complete newbie wrt to folding in vim, I'm just experimenting with it.
HTH
Hi Jeri,
Sorry, I'm not familiar with fold expression.
I checked the url you provided, but nothing useful found related to folding
c++ style comment.
Thanks anyway.
Wayne
On Mon, Aug 9, 2010 at 7:12 PM, Jeri Raye jeri.r...@gmail.com wrote:
Hi Wayne
Can you do something with a fold
10 matches
Mail list logo