为什么vim命令viB不能在ruby中运行?

时间:2020-12-24 07:02:54

I would like to select the inner contents of a do/def..end block

我想选择do / def..end块的内部内容

def foo
    bar
end

e.g. bar would be selected above when hitting viB in the same way bar would be selected below in C:

例如按下以下相同的方式击中viB时,将在上面选择条形:C将在下面选择条形:

void foo() {
    bar;
}

I know it probably only works for curly braces, but is there a way to make it work for do/end?

我知道它可能只适用于花括号,但有没有办法使它适用于do / end?

1 个解决方案

#1


1  

If you tend to leave empty spaces before and after your definitions (like I do) then you can use vip which highlights a paragraph.

如果您倾向于在定义之前和之后留下空白区域(就像我一样),那么您可以使用突出显示段落的vip。

#1


1  

If you tend to leave empty spaces before and after your definitions (like I do) then you can use vip which highlights a paragraph.

如果您倾向于在定义之前和之后留下空白区域(就像我一样),那么您可以使用突出显示段落的vip。