I'm currently having to deal with C++ code which uses the
following coding conventions:

        namespace NS
        {
                void f()
                {
                        if (c)
                        {
                        }
                }
        }

My problem is getting [[ and ]] to advance or go back to the
next function (or class); the opening braces aren't always in
column 1; the column they are in depends on the nesting of the
namespace declarations, and there are a lot of lines which would
match e.g. /^[ ^I]*{$/, but which don't start a function or a
class, so I can't think of a regular expression which would
match, either.  I rather suspect that some parsing of the C++
itself will be necessary.

The suggestion in the help of e.g. ":map ]] j0[[%/{" doesn't
work, since from anywhere in the namespace, it will go to the
end of the namespace before searching for {.  Does anyone know
of any available solution?

--
James Kanze

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to