如何使用 Vim 从 do 跳转到 Ruby 块的结尾? [英] How to jump from do to end of a Ruby block using Vim?
本文介绍了如何使用 Vim 从 do 跳转到 Ruby 块的结尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 vim 进行 ruby、php 和 perl 开发.有一个快捷方式 % 可以从块的开头(子程序/函数/方法/if)跳转到结尾,反之亦然.对我来说,ruby 中 do/end 标签上的 % 不起作用.
I'm using vim for ruby, php and perl development. There is the shortcut % to jump from the begin of a block (subroutine/function/method/if) to the end and vice versa. For me a % on a do/end tag in ruby doesn't work.
我怎样才能用 vim 做到这一点?
How can I do that with vim?
推荐答案
matchit 插件 允许匹配的不仅仅是括号和注释.可以在此处找到 ruby 版本.
The matchit plugin allows matching more than just parentheses and comments. A ruby version can be found here.
这篇关于如何使用 Vim 从 do 跳转到 Ruby 块的结尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文