ctags

VIM: More precise C/C++ code parsing solutions?

孤者浪人 提交于 2019-11-28 17:12:05
问题 Pre: I've been working in VIM for like a year already. Lots of great things: combinations, scripts. Whenever I'm editing something in a different editor, I feel sluggish/uncomfortable without VIM's navigation. The problem: The thing that really bothers me most of all is source code navigation using existing tools (ctags, cscope). Often, ctags can't find the declaration of a variable, cscope as opposed to ctags finds all definitions with the same variable name. Same craziness with call tree

Vim - ctags: tag not found

百般思念 提交于 2019-11-28 16:45:38
问题 I want to use Ctags for a Zend framework project. I executed this command : ctags -R ./* ../ZendFramework/* to create a list of tags, but the problem is when I press Ctrl-] on a class or method I get this error: ctags: tag not found I checked the tags file and all classes/methods/variables are listed. The tags files is located in the root of the project. Should I load it manullay when I open a file? 回答1: Yes, you should tell Vim where to find your tags file with something like: :set tags=

How to exclude multiple directories with Exuberant ctags?

倾然丶 夕夏残阳落幕 提交于 2019-11-28 16:38:51
问题 I have looked and tried to use exuberant ctags with no luck with what I want to do. I am on a mac trying to work in a project where I want to exclude such directories as .git, node_modules, test, etc. When I try something like ctags -R --exclude=[.git, node_modules, test] I get nothing in return. I really only need to have it run in my core directory. Any ideas on how to accomplish this? 回答1: The --exclude option does not expect a list of files. According to ctags 's man page, "This option

How can I make vim's taglist plugin show useful information for javascript?

旧街凉风 提交于 2019-11-28 16:32:47
问题 I've recently abandoned mouse-driven, platform-specific GUI editors and committed entirely to vim. The experience so far has been fantastic, but I'm stuck when it comes to Javascript. The ever-popular taglist utility (using Exuberant Ctags) has been great for everything but Javascript. With the language's overly-free form and structure, taglist could only pick up a handful of functions when I opened it up -- only those defined in the format: function FUNCNAME (arg1, arg2) { but no variables

Alternatives to Ctags/Cscope with Objective-c?

荒凉一梦 提交于 2019-11-28 15:42:14
问题 Are there any alternatives to ctags and cscope with Objective-c support. This does pertain to cocoa development, so inevitably it seems I will be using Xcode (and probably should). I was just wondering what are my Vim options. Maybe there is some type of plugin system like eclim, but for xcode? EDIT So it seems that other than updating ctags to support objective-c, I'm out of luck. Does anyone know if cscope is the same? 回答1: a long time after this question, " playing " with vim, I wanted

Vim : how to index a plain text file?

99封情书 提交于 2019-11-28 04:42:54
问题 Is it possible to index a plain text file (a book) in vim such as : 1. This line contains the words : London, Berlin, Paris 2. In this line, I write about : New-York, London, Berlin ... 100. And, to conclude, my last comments about : New-York, Paris and have this resulting index : Berlin : 1 London : 1, 2 New-York : 2, ..., 100 Paris : 1, ..., 100 and, if it is possible, what is the tagging method ? I have read about ctags, but it seems to be dedicated to specific languages (and to say the

Get ctags in vim to go to definition, not declaration

时光毁灭记忆、已成空白 提交于 2019-11-28 03:54:43
I'm having the problem that ctags in vim/gvim takes me to a forward declaration a lot of times instead of to the actual definition of the function. Any way to get around that? Derek I think that the easiest way is to use "g ctrl-]" instead of just "ctrl-]". If there is only one match, it will take you there. If there are multiple matches, it will list them all, letting you choose the one you want, just like :tselect. The best of both worlds. :) You should be able to use tn and tp to jump to the various matching tags. Press ^] to take you to the first match. If that's not the match you want,

cscope or ctags why choose one over the other?

做~自己de王妃 提交于 2019-11-27 09:56:34
I primarily use vim / gvim as an editor and am looking at using a combination of lxr (the Linux Cross Reference) and either cscope or ctags for exploring the kernel source. However, I haven't ever used either cscope or ctags and would like to hear why one might choose one over the other taking into consideration my use of vim as a primary editor. ctags enables two features: allowing you to jump from function calls to their definitions, and omni completion. The first means that when you are over a call to a method, hitting g] or CTRL-] will jump to the place where that method is defined or

VIM使用系列:使用VIM进行项目开发的准备工作

蹲街弑〆低调 提交于 2019-11-27 05:02:32
在Linux系统下进行开发的时间零零散散算起来也有将近一年半了,刚开始的时候用的最原始的VIM进行简单的代码编辑,那段时间让我熟练了VIM的命令、编辑模式切换,方向移动和命令模式下的常用命令,第一次认识到了VIM的强大。之后参与的项目开发,虽说使用的是Linux系统,但是应用代码的主要编辑工作是在Source Insight下完成的,VIM用的也就少,慢慢地用起来有点手生。但是内心对于VIM的那种简洁、直接和高效依然恋恋不舍,常常会温习VIM的命令和技巧,一直在找机会掌握VIM进行完成的项目开发。直到这个项目,环境、机会(天时、地利、人和)俱全,我进入了状态~~ 一、使用VIM进行项目开发之前的基础 Linux系统中shell基本命令、常用命令的熟练使用 Linux系统文件系统知识、概念的基本理解 能够使用VIM完成基本的文本编辑工作,熟悉三种模式和基本命令 现在的Linux发行版基本都已经装好了VIM,如果没有,那就需要自己进行安装,最好是VIM7.0以上版本,不过大多数发行版的源默认都是最新版本,除非是自己使用源码按照,就需要注意。 二、VIM的配置文件及推荐插件 VIM的配置文件:.vimrc,一般都是在用户的home主目录下,该文件决定了VIM启动时的基本环境和可使用命令、工具等,在VIM的使用中具有举足轻重的地位。网络上有很多大能的.vimrc文件提供参考、下载

Vim auto-generate ctags

好久不见. 提交于 2019-11-27 02:32:34
Right now I have the following in my .vimrc : au BufWritePost *.c,*.cpp,*.h !ctags -R There are a few problems with this: It's slow -- regenerates tags for files that haven't changed since the last tag generation. I have to push the enter button again after writing the file because of an inevitable "press Enter or type command to continue". When you combine these two issues I end up pushing the additional enter too soon (before ctags -R has finished), then see the annoying error message, and have to push enter again. I know it doesn't sound like a big deal, but with the amount of file writes I