跳转到vim中的函数定义 [英] Jump to function definition in vim

查看:392
本文介绍了跳转到vim中的函数定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用vim跳转到函数定义?例如,使用Visual Assist,我可以在一个函数下键入 Alt + g ,并打开一个上下文菜单,其中包含定义的文件。



我该如何在vim中做这样的事情? 使用ctags。生成一个标签文件,并使用:tags命令告诉vim它在哪里。然后,您可以使用 Ctrl - ]跳转到函数定义。



有更多标签技巧和提示这个问题


How can I jump to to a function definition using vim? For example with Visual Assist, I can type Alt+g under a function and it opens a context menu listing the files with definitions.

How can I do something like this in vim?

解决方案

Use ctags. Generate a tags file, and tell vim where it is using the :tags command. Then you can just jump to the function definition using Ctrl-]

There are more tags tricks and tips in this question.

这篇关于跳转到vim中的函数定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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