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

fold c++ style comment

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

Re: fold c++ style comment

2010-08-09 Thread Jeri Raye
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

Re: fold c++ style comment

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