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

closed as off-topic by masegaloeh, Andrew Schulman, Hyppy, Scott Pack, mdpc Apr 27 at 20:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – masegaloeh, Andrew Schulman, Hyppy, Scott Pack, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
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
    
Programming questions must go to stackoverflow.com . –  peterh Apr 27 at 0:17

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

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