cscope

Vim and Ctags tips and tricks [closed]

匿名 (未验证) 提交于 2019-12-03 02:00:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have just installed Ctags (to help with C++ development) with my Vim (or rather gVim), and would like to find out your favorite commands, macros, shortcuts, tips that go along with it... Share your best arsenal. What other Vim add-ons you would recommend for C++ on Vim development? EDIT What other add-on you would use in conjunction with Ctags? EDIT2 What version of gVim you use with tags? Does it make a difference? EDIT3 How do you enhance your programming experience for both big and small projects? 回答1: Ctrl + ] - go to definition Ctrl +

Using cscope to browse Python code with VIM?

风格不统一 提交于 2019-12-03 01:05:00
问题 Has anyone managed successfully using cscope with Python code? I have VIM 7.2 and the latest version of cscope installed, however it doesn't get my code's tags correctly (always off by a couple of lines). I tried the pycscope script but its output isn't supported by the modern version of cscope . Any ideas? Or an alternative for browsing Python code with VIM? (I'm specifically interested in the extra features cscope offers beyond the simple tags of ctags ) 回答1: EDIT: I'm going to run through

How to make cscope display full file paths during search

醉酒当歌 提交于 2019-12-03 00:28:00
When I search for a C symbol or global definition using cscope , it displays the file-names and line numbers. I would like to see the full file-paths so that I can jump to my arch specific file. For example, when searching for global definition of __switch_to on cscope build on Linux code-base, I get: Global definition: __switch_to File Line 0 process.c 297 struct task_struct *__switch_to(struct task_struct *prev, 1 switch_to.h 44 #define __switch_to(prev,next,last) do { \ 2 process.c 202 struct task_struct *__switch_to(struct task_struct *old, 3 process.c 400 struct task_struct *__switch_to

How to let cscope use absolute path in cscope.out file?

雨燕双飞 提交于 2019-12-02 19:36:58
Everytime after load a cscope.out in Vim, I need to change Vim's "pwd" to the same directory as cscope.out file is under, which might be due to that cscope use relative path when generating tag file. So if there is a way to force cscope to use absolute path in its tag file - cscope.out, then it will be regardless of whether the pwd of your Vim session is the same as the directory that cscope.out file is under. When importing cscope.out, you can supply the prefix, i.e. :cscope add /path/to/cscope.out /path/to/src/code Then your searches will turn up like: Cscope Tag: foobar # line filename /

How to search in vim cscope result window

▼魔方 西西 提交于 2019-12-01 01:05:34
When we use cscope to go to definition of a symbol in vim, lots of candidates may be shown in result window. I'd like to perform searching within the window to find what I need quickly. But search function (/) doesn't seem to work in result window, only a few keys are available, j,k,gg,G, etc. Is there anyway to search in cscope result window? Or can anyone share some experiences with how to work more efficiently in such a situation. Thanks. You can use the following: " Filter the quickfix list function! FilterQFList(type, action, pattern) " get current quickfix list let s:curList = getqflist(

Python开发环境配置 Vim + Ctags+ TagList

ε祈祈猫儿з 提交于 2019-11-30 09:25:28
在 Linux 下对 vim 进行一些配置,使之支持如下特性: 1. 加强的 Python 语法高亮显示; 2. 对脚本、项目生成 ctag 序列; 3. 在 vim 中显示 ctag 序列列表; 4. Python 函数、类的自动补全; 5. Python 代码自动折叠; 一、准备 本文以 CentOS 5.6 为例对系统默认自带的 vim 进行配置。在开始之前需要确认系统已经安装了以下 RPM 包:vim-enhanced、ctags。 1. 配置 vim alias,使 vim 成为默认的 vi 编辑器: # echo alias vi=\'vim\' >> ~/.bashrc # source ~/.bashrc 2. 复制默认的 .vimrc 初始化文件: # cp /usr/share/vim/vim70/vimrc_example.vim ~/.vimrc # vi ~/.vimrc 可以添加一些配置: 1 2 3 4 5 6 set tabstop = 4 set softtabstop = 4 set shiftwidth = 4 set expandtab set autoindent set number 这样,我们就完成了对 vim 的一些前期准备。下面开始进行 vim Python IDE 环境的配置。 二、Python IDE 环境配置 1. 加强

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

心已入冬 提交于 2019-11-29 21:00:35
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 navigation, finding forward declarations along with a single class definition etc. Compared to MS

Alternatives to Ctags/Cscope with Objective-c?

南笙酒味 提交于 2019-11-29 19:55:16
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? Vincent Guerci a long time after this question, " playing " with vim, I wanted ObjC support, especially with taglist plugin. I found that question, then digged a bit, and here

Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctags

喜夏-厌秋 提交于 2019-11-29 19:03:14
I work on C++ projects, and I went through Alex Ott's guide to CEDET and other threads about tags in StackOverflow, but I am still confused about how Emacs interfaces with these different tag systems to facilitate autocompletion, the looking up of definitions, navigation of source code base or the previewing of doc-strings. What is the difference (e.g. in terms of features) between etags , ebrowse , exuberant ctags , cscope , GNU Global and GTags ? What do I need to do to use them in Emacs ? Do I need semantic/senator (CEDET) if I want to use tags to navigate/autocomplete symbols? What does

Emacs/CEDET. Multiple projects and code completion

萝らか妹 提交于 2019-11-29 04:32:39
问题 I've setup emacs 23.1.50.1 with CEDET 1.0 and ECB 2.40 (heavily inspired by Alex Otts setup at http://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el and his gentle introduction to Cedet ( http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html ), thanks Alex). It works quite well, but I need more understanding about how code-completion and symbol-references are handled when working with multiple projects. I've created a simple ede project like this: (ede-cpp-root