ctags

Jumping back to a previously opened file in Vim

与世无争的帅哥 提交于 2020-01-01 07:34:09
问题 While using Vim I'll sometimes want to look at a function definition or a struct definition, so I'll use C-] to jump to it. However, there are a few problems I run into. First off, I don't know how to jump back easily. It appears the previous file I was in closes and I'm now in the new one. Is there a way to jump back, or keep a stack of open files that I can pop back to or something? Another thing I've noticed that when I have a change in the current file I need to save it because, like a

Exuberant Ctags on Mac

廉价感情. 提交于 2019-12-31 17:37:56
问题 I'm currently using vim for my PHP development. A few weeks ago I bought myself a mac, and wanted to re-generate my tags for a new Zend Framework version. I used the following script in the past (linux machine) to generate the tags: #!/bin/bash cd ~/www/ZF/ ctags-exuberant -f ~/.vim/tags/zend \ -h ".php" -R \ --exclude="\.svn" \ --totals=yes \ --tag-relative=yes \ --PHP-kinds=+cf \ --regex-PHP='/abstract class ([^ ]*)/\1/c/' \ --regex-PHP='/interface ([^ ]*)/\1/c/' \ --regex-PHP='/(public

How to programmatically create/update a TAGS file with emacs?

为君一笑 提交于 2019-12-31 08:51:46
问题 Is there any plugin for emacs to automatically update the TAGS file in my C project (for example on buffer save or access) or create a new one if there is no TAGS file present? I am running on Windows (without Cygwin), so all the fancy shell scripting does not help. I was hoping for a native emacs solution not using any external scripting. I already tried build-tags.el and etags-table.el but none of these really worked (the way I wanted). Any other ideas? 回答1: etags-update may help in your

cscope or ctags why choose one over the other? [closed]

南笙酒味 提交于 2019-12-28 03:15:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 months ago . 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

Am I even using Exuberant ctags?

懵懂的女人 提交于 2019-12-25 03:34:51
问题 After downloading and installing exuberant ctags, I get some issues hinting that the ctags shell command isn't corresponding to my newly installed ctags. Directory_of_Scripts$ ctags usage: ctags [-BFadtuwvx] [-f tagsfile] file ... Directory_of_Scripts$ ctags -R ctags: illegal option -- R usage: ctags [-BFadtuwvx] [-f tagsfile] file ... Apparently the ctags i'm using does not have the option to collect files recursively (-R option) and it wants a file as an argument; the current exuberant

ctags and tagbar configuration are out of sync

走远了吗. 提交于 2019-12-24 06:35:37
问题 I'm trying to use tagbar for reading code in jquery-1.7.1.js(renamed jquery.js) ,but it doesn't work and display any errors : "your ctags and tagbar configuration are out of sync! ". And my ~/.ctags file: --regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*new[ \t]+Object\(/\1/o,object/ --regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/o,object/ --regex-JavaScript=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/f,function/ --regex-JavaScript=/function[ \t]+([A-Za-z0-9._$]+)[

VIM: hack ctags or tweak tagbar for better PHP support

亡梦爱人 提交于 2019-12-24 03:14:14
问题 Recently, i gave up Taglist for Tagbar . Tagbar works as expected for all languages except PHP. It lists class, methods and variables into their respective categories instead of displaying methods and variables into their respective scope. I came to know that ctags has poor support for PHP. Is there any way to improve ctags and Tagbar's support for PHP? I am hopping for some kind of hack or tweak, or any other way around. 回答1: I have just using PHP_Parser as syntax parsing backend written a

ctrl-] is not working for tcl code navigation

穿精又带淫゛_ 提交于 2019-12-22 08:00:01
问题 I am new to Tcl/Tk, I am using Vim to code and browsing. The syntax highlighting for Tcl/Tk is working fine. The jump into the function using Ctrl ] doesnt work it gives me an message saying that " cstag: tag not found ". I have installed ctags and generated tags using " ctags -R *.tcl ". I have extensively used namespaces in Tcl/Tk code. The tags generated in tags file is something like this " namespace1::function1 ". How do i get Ctrl ] (and Ctrl T for popping from stack) working in Vim?

cscope error when trying to use ctags in vim

£可爱£侵袭症+ 提交于 2019-12-21 05:18:51
问题 I have generated ctags for my projects: ctags -f /home/grae/tags --recurse --langmap=C++:.C.h.c.cpp.hpp.inl --languages=C++ --extra=+q --fields=+iaS --c++-kinds=+p --verbose framework/ modules/ /usr/include/ I then added the tags to .vimrc: set tags+=/home/grae/tags I also temporarily added the following (but have now removed): set csto=1 Now when I try Ctrl+] or g] I get the error: cstag: tag not found I shouldn't be using cscope so I'm not sure how this has happened. My current thoughts are

How to make cscope display full file paths during search

放肆的年华 提交于 2019-12-20 10:46:30
问题 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