如何从块的开头到C块的末尾,反之亦然?

时间:2012-06-08 11:13:02

标签: vim

我在C中有一段代码 -

enum colors { //---->I am here
RED,
BLUE,


/* Hundreds of colors in between */


}; // -----> I want to reach here in the easiest possible way.

从块的末尾回到块的开头也很有用。

2 个答案:

答案 0 :(得分:5)

通常%键执行此操作(在 Normal 模式下)。它有两种方式。您可能还想查看the relevant documentation

答案 1 :(得分:1)

您可以使用“Shift + 5”键在代码块的开头/结尾之间跳转。