Vim中类似Sublime代码的方法浏览器 [英] Sublime code-like method browser in Vim

查看:73
本文介绍了Vim中类似Sublime代码的方法浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Sublime代码具有Super-R快捷方式,该快捷方式可打开方法浏览器,列出当前类(Ruby)中的所有方法。

Sublime code has a shortcut Super-R which opens a method browser listing all methods in current class (Ruby). Is there a plugin to get similar functionality in Vim?

/ def或 m]仅在您熟悉类并知道使用哪种方法的情况下才能工作

"/def " or "m]" work only if you're familiar with the class and know what method you want to go to, whereas Super+R works for just exploring a class.

推荐答案

TagList 插件是另一个(非常受欢迎)的选项。有很多其他

The TagList plugin is another (very popular) option. There are a bunch of others.

仅供参考, / def m] 不是Sublime Text的 Ctrl + R 的等效项。那就是:tag foo ,如果您不知道所有方法的名称,都可以使用Tab键完成。

FYI, /def and m] are not the equivalent of Sublime Text's Ctrl+R. That would be :tag foo which you can tab-complete if you don't know all the names of your methods.

在此过程中, CtrlP 插件具有与Sublime Text的功能非常相似的功能 Ctrl + R :CtrlpBufTag 我每天使用数百次。

While we are at it, the CtrlP plugin has a feature very similar to Sublime Text's Ctrl+R: :CtrlpBufTag that I use hundreds of times a day.

所有这些方法取决于标签文件的存在。 >旺盛的Ctags 或某些兼容程序。实际上,标签是Vim体验中非常重要的一部分。

All of these methods depend on the presence of a tags file generated by Exuberant Ctags or some compatible program. Actually, tags are quite an important part of the Vim experience.

这篇关于Vim中类似Sublime代码的方法浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆