Re: çå¤: how fold all comment line?
- (please don't top poste)
On Thu, November 15, 2012 10:33, 王军 wrote:
> If do you said, only fold "//" which are at the front of line
> So I modify ,and like " set fde=getline(v:lnum)=~'\s*\/\/\\\|^\s*$'?1:0"
you could leave out the first \s*, it doesn't matter here.
> Now it will fold "//" which at back of line.
> Like this " a = b; //comment
You need to anchor your pattern to the beginning of the line, like this:
set fde=set fde=getline(v:lnum)=~'^\s*\/\/\\\|^\s*$'?1:0 fdm=expr fen
You should probably read an introduction to regular expressions, like
:h 27.4 and the following.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php