Re: fold c++ style comment -- resolved but issue exist.

2010-08-24 Thread Wayne
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,

Re: fold c++ style comment -- resolved but issue exist.

2010-08-11 Thread Wayne
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

Re: fold c++ style comment -- resolved but issue exist.

2010-08-10 Thread Wayne
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

Re: fold c++ style comment -- resolved but issue exist.

2010-08-10 Thread Benjamin R. Haskell
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

Re: fold c++ style comment -- resolved but issue exist.

2010-08-10 Thread Wayne
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

Re: fold c++ style comment -- resolved but issue exist.

2010-08-10 Thread Benjamin R. Haskell
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

Re: fold c++ style comment -- resolved but issue exist.

2010-08-10 Thread Wayne
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