Hi all,
in c++0x it will be possible to use lambda functions.
So, for example, this:
[](int n) { return n+ 1; }
Will become valid c++.
Unfortunately it breaks current C++ highlighting.
After a line like the one above, all curly brackets will be highlighted by VIM as “unmatched”, making reading the code really hard.
Is there a quick way to fix that?
Thanks,
Andy.
You can vote for the C++ standard to not add things like this to make
the language even more cryptic.
Well, perhaps that's not a quick way, but it will make programmers who
try to decipher C++ programs a lot more sane.
--
It might look like I'm doing nothing, but at the cellular level
I'm really quite busy.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
If the dream is BIG enough,the facts don't count!
Fair enough. I can take on that work. I'll just need a few pointers.
I know that c.vim is built-in. How can I get a hold of it?
Syntax files install to /usr/share/vim/vim73/syntax (for Vim 7.3) by
default, if I'm not mistaken. If you're on Windows, it's probably
somewhere underneath the Vim installation directory.
Shouldn't it be cpp.vim?
Or does cpp.vim include c.vim's definitions too?
" Read the C syntax to start with
if version < 600
so <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
unlet b:current_syntax
endif
..in c.vim.
A quick fix to solve the problem is to clear all bracket errors - you
can do this by a line:
:hi link cErrInParen Normal
in your .vimrc/_vimrc
The side effect is that *NONE* of the bracket errors are highlighted.
Before hacking c.vim, try setting c_no_curly_error in your .vimrc and
see if that gives you what you want. See :help ft-c-syntax for other
options.
Mike
--
Doing nothing is tiring because you can't take a break.