1

Let say I am working on a code which look like this, in C for example.

function foo() {
  int a;
  int b;
  15 kLoC
  for (int i = 0; i < n; i++) {
    15 kLoC
    if (bar) {
      while (true) {
        **cursor is here**
      }
    }
  }
}

I would like vim display a summary of the context where the cursor is, something like:

funtcion foo()
  for (int i = 0; i < n; i++)
    if (bar)
      while (true)
Jérôme
  • 181
  • 2
  • 7

2 Answers2

2

I finally find a plugin doing what I am looking for:

CTX: C context for Vim http://chouser.n01se.net/ctx/

Jérôme
  • 181
  • 2
  • 7
1

You could do Code Folding to achieve this, take a look here

Sideshowcoder
  • 523
  • 2
  • 9
  • It was not specified, but the purpose here is to make easier the understanding of an unknown source code. Code folding seems to not be the best solution. – Jérôme Feb 09 '10 at 13:11
  • Yeah in that case no, I was thinking of my own code and having a better overview. – Sideshowcoder Feb 09 '10 at 15:26