gpt4 book ai didi

ruby - 是否有任何命令可以使用 vim 转到 Ruby block 的末尾(或开始)

转载 作者:数据小太阳 更新时间:2023-10-29 07:06:58 24 4
gpt4 key购买 nike

有没有办法使用 vim 结束 Ruby block ?例如

module SomeModule

# <Supposing that the cursor is HERE>
def some_method
end

end

我想用一个命令从光标所在的位置移动到 block 的末尾,这可能吗?

我读过 this documentation ,但它似乎不适用于 .rb 文件,我在某些地方读到它只适用于 C(虽然还没有尝试过)。

提前致谢。

最佳答案

rubyforge 好像有官方包对此有一些支持:

The Ruby ftplugin now includes Ruby specific implementations for the [[, ]], [], ][, [m, ]m, [M, and ]M normal mode commands. These allow you to move to move quickly between module, class and method declarations.

编辑:自述文件说这些文件包含在默认的 VIM 发行版中,但它们在 Windows 上的 GVIM 中对我不起作用,“{”和“}”似乎在 vim 上有效Linux下

关于ruby - 是否有任何命令可以使用 vim 转到 Ruby block 的末尾(或开始),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1275736/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com