Sunday, June 30, 2013

Don't fold C++ namespaces.

I've got foldmethod set to syntax. How can I tell vim not to fold C++ namespace blocks?

I was able to do it actually, by editing the cBlock sytanx region in the default c.vim syntax file like this:

syn region cBlock start="\(namespace .* \)\@<!{" end="}" transparent fold

But it just doesn't look right to do it like that, plus I'd like to have a "local" solution (i.e. one I can just put in my .vimrc or somewhere in .vim/).

Any ideas?

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment