> IIRC, and it takes a long time to work down to it, but in vim's online
> help or tutorial, there is a key sequence that takes you to the start
> of the current "block" - where "block" can be defined by " ([{" - so
> you could use that to search outwards until you reach the start of
> the function. Unfortunately I don't remember the key sequence :-(

Well I didn't exactly remember correctly but...
In the online help of vim-7.2 (type :help) go to "chapter" usr_29.txt
and look for section "29.3 Moving hrough a program" where it describes
the use of [{ and [( to navigate by braces and parentheses. To quote:
<pre>
   The "[{" command moves to the start of the current block.  It skips over
pairs of {} at the same level.  "]}" jumps to the end.
   An overview:

                        function(int a)
           +->          {
           |                if (a)
           |       +->      {
        [[ |       |            for (;;)               --+
           |       |      +->   {                        |
           |    [{ |      |         foo(32);             |     --+
           |       |   [{ |         if (bar(a))  --+     | ]}    |
           +--     |      +--           break;     | ]}  |       |
                   |            }                <-+     |       | ][
                   +--          foobar(a)                |       |
                            }                          <-+       |
                        }                                      <-+

</pre>
Let's hope the ascii art survives

D.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to