Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)
share|improve this question
I hope 15 kLoC doesn't mean '15 thousand lines of code'. –  pavium Feb 9 '10 at 10:41
It is just an example. The meaning of 15 kLoC is scrolling to find where can be very hard in some cases. –  Jérôme Feb 9 '10 at 10:47

2 Answers 2

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

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

share|improve this answer

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

share|improve this answer
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 9 '10 at 13:11
Yeah in that case no, I was thinking of my own code and having a better overview. –  Sideshowcoder Feb 9 '10 at 15:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.