On Sep 10, 4:07 am, "[email protected]" <[email protected]> wrote: > Hi, > > I would like to fold C code at { and } but with functions only, not > for 'if', 'for', 'switch' etc. > > And I would like to keep #if, #endif folds, too. >
This might be easier to do with a foldexpr instead of syntax folding, especially if you don't want to make an entirely new c.vim file. Create a function that will determine whether the current line is a function definition, start of pre-processor block, end of pre- processor block, or top-level '}' and use it with foldmethod=expr. See the :help for how to use these options. -- 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
