用vim显示范围上下文的总结

假设我正在编写一个看起来像这样的代码,例如C语言。

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

我想vim显示光标所在的上下文的总结,如:

 funtcion foo() for (int i = 0; i < n; i++) if (bar) while (true) 

我终于find一个插件做我在找的东西:

CTX:Vim的C语言http://chouser.n01se.net/ctx/

你可以做代码折叠来实现这一点,看看这里