如何在VIM中的大型项目中导航 [英] How to navigate in large project in VIM
问题描述
如何仅使用VIM管理大型项目(数百个文件)?
How do you manage big projects (hundreds of files) using only VIM?
我个人开始遇到比小型项目更大的问题。
I personally start having problems in any larger than small project.
- 有什么方法可以快速地提交,最好是带有名称补全功能?
- 与转到相同类定义,当它在另一个文件中时
我有点了解VIM的所有基础知识,因此使用它没有问题用于编写脚本或快速编辑一些源代码。
I kinda know all the VIM basics, so I don't have problem using it for writing scripts or quick editing some source code. But it gets really messy for me when I have to navigate between files.
推荐答案
VIM对标记<。为项目创建标签文件后,您可以跳转到方法,类等的定义或声明,包括跨文件跳转,全部都在同一编辑会话中进行。
VIM has excellent support for tags. Once you have created a tags file for your project, you can jump to a definition or declaration of a method, class, etc., including jumping across files, all inside the same editing session.
尝试
:help tags
要为C / C ++生成标记文件,请转到您的shell提示符(假设您的系统是* nix / Cygwin),然后键入
To generate a tags file for C/C++, go to your shell prompt (I'm assuming your system is *nix/Cygwin) and type
info ctags
或
ctags --help
这篇关于如何在VIM中的大型项目中导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!