ctags

VIM - Sourcing tags from multiple locations in project

回眸只為那壹抹淺笑 提交于 2019-12-09 06:25:35
问题 Good day, I typically work on relatively small (less than 20,000 lines of code) projects that are all self contained within a single directory, have their own Makefile, and are fairly easy to work with. VIM is my preferred editor, and when I open a project, I typically build the ctags list via a mapping to the F10 key: map <F10> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR> This allows me to jump to the definition of a variable/struct/etc via moving the cursor over the text, and

ctags and R regex

南楼画角 提交于 2019-12-08 06:25:56
问题 I'm trying to use ctags with R. Using this answer I've added --langdef=R --langmap=r:.R.r --regex-R=/^[ \t]*"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t]function/\1/f,Functions/ --regex-R=/^"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/g,GlobalVars/ --regex-R=/[ \t]"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/v,FunctionVariables to my .ctags file. However when trying to generate tags with the following R file x <- 1 foo <- function

Vim keyword completion for ctags with backslashes?

∥☆過路亽.° 提交于 2019-12-08 02:53:48
问题 I'm using ctags for keyword completion on a PHP project in vim. Since ctags doesn't handle PHP namespaces out of the box, I've added a regex option to my ctags command: ctags (...) --regex-PHP='^namespace\s+([^;]*)/\1/c/' (...) This works fairly well: if I type Foo<Ctrl+N> I get suggestions for Foo , Foo\Bar , Foo\Bar\Baz and so on. However, the backslash seems to count as a word separator when vim determines the keyword to look up in the tags file. In other words, typing Foo\Ba<Ctrl+N> does

如何将一个Vim配置成C/C++兼Erlang开发环境

我的未来我决定 提交于 2019-12-07 19:09:19
1.首先介绍下c.vim,为什么要装c.vim C.vim即C-Support vim,能够帮助C程序员[当然还有使用C++ 的家伙]很好的完成 给文件或者函数说明 , 给函数添加注释,或者添加一个注释块,添加函数等等, 为你节约时间,并保护你的键盘。插件作者Fritz Mehner,编写c.vim的宗旨是“Write and run programs. Insert statements, idioms, comments”. c.vim 就是c/c++编程的一个IDE,其功能堪比windows里面的vc,不仅可以让你编写代码更加快捷,而且还可以编译程序 2.安装c.vim插件 第一步:下载C.VIM Vim的官网 下载c.vim 注:我下载的事 第二步 下载好了之后,解压安装 #mkdir ~/.vim //注:所有的插件都要装在这儿 #cp /mnt/feichanghao/vimm/cvim.zip ~/.vim //把插件移动到目标目录中 #cd ~/.vim #unzip cvim.zip 注:解压的时候会生成一些目录,需要注意一下,因为以后要用 syntax,plugin,ftplugn,doc,c-support,autoload plugin.:这个文件夹里面放着文件类型插件,后面的a.vim插件直接放在这个目录就行 doc: 这个目录存放的是帮助文档 第三步

将Vim改造为强大的IDE—Vim集成Ctags/Taglist/Cscope/Winmanager

℡╲_俬逩灬. 提交于 2019-12-07 19:09:02
1、安装Vim和Vim基本插件 首先安装好Vim和Vim的基本插件。这些使用apt-get安装即可: lingd @ubuntu :~/arm$sudo apt-get install vim vim-scripts vim-doc 其中vim-scripts是vim的一些基本插件,包括语法高亮的支持、缩进等等。 vim中文帮助文档tar包下载地址: http://sourceforge.net/projects/vimcdoc/files/vimcdoc/ 解压后其中有个doc文件夹, 将其中的内容全部复制到~/.vim/doc, 或者vim安装目录下的doc目录中, 此时vim中的help信息已经是中文的了. 网页版中文帮助文档网址http://vimcdoc.sourceforge.net/doc/help.html 首页就时vim帮助文档的目录,阅读起来更方便有效、更有针对性! 2、Vim配置文件 Vim强大的功能,其来源基本上就两个地方:Vim插件以及Vim配置文件。 Vim本身的系统配置文件夹是在/usr/share/vim/和/etc/vim/两个文件夹下。一般情况下,我们不会去改变这两个文件夹下的配置文件,而是在用户文件夹/home/user(其中,user为用户名,我的用户名是lingd)下建立自己的配置文件。进入用户文件夹(/home/user/)之后

Any idea why ctags won't recurse on Cygwin?

夙愿已清 提交于 2019-12-07 15:39:48
问题 I'm getting "skipping XXX: it is not a regular file" every time I run ctags -R XXX . For one reason or another, ctags on Cygwin isn't recursing directories. Surely, I must be doing something stupid. Whenever I try the de-facto standard ctags -R in my project root, it complains that I didn't specify any input files. When I specify a directory, it seems to think its a file. I'm a tad stumped. I installed a fresh Cygwin build last week from scratch. I installed everything. I rarely use Cygwin.

ctags, vimwiki, vim and tagbar-plugin

十年热恋 提交于 2019-12-07 15:28:57
问题 I try to create tags for a wiki-file = vimwiki. This is my definition for ctags, stored as ctags.cnf --langdef=vimwiki --langmap=vimwiki:.wiki --regex-vimwiki=/^=[ \t]+(.*)/\1/h,heading1/ --regex-vimwiki=/^==[ \t]+(.*)/2-\1/h,heading2/ --regex-vimwiki=/^===[ \t]+(.*)/3-\1/h,heading3/ --regex-vimwiki=/^====[ \t]+(.*)/4-\1/h,heading4/ Calling ctags --verbose index.wiki results in: ... Considering option file .\ctags.cnf: reading... Option: --langdef=vimwiki Option: --langmap=vimwiki:.wiki

ctags and R regex

自闭症网瘾萝莉.ら 提交于 2019-12-07 03:39:25
I'm trying to use ctags with R. Using this answer I've added --langdef=R --langmap=r:.R.r --regex-R=/^[ \t]*"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t]function/\1/f,Functions/ --regex-R=/^"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/g,GlobalVars/ --regex-R=/[ \t]"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/v,FunctionVariables to my .ctags file. However when trying to generate tags with the following R file x <- 1 foo <- function () { y <- 2 return(y) } Only the function foo is recognized. I want to generate tags also for

Universal ctags on Windows

人走茶凉 提交于 2019-12-07 02:57:40
问题 I'm new to ctags. After reading some information about the program, I concluded that "Universal ctags" is the newest version (successor of "exhuberant ctags") and still under active development: https://ctags.io/ Most people use it on Linux. For some specific reasons I need to use it on Windows (Windows 10, 64-bit to be more precise). I'm looking for an executable file of Universal ctags. Do you know where to download such an executable? PS: I'm not interested in the cygwin-approach (again

ctags doesn't understand -e option (no exuberant tags option)

别说谁变了你拦得住时间么 提交于 2019-12-06 22:32:48
问题 When I type ctags -e it returns an error saying it doesn't know that command line option. I thought it should know about exuberant tags because etags works on cli. Also, I recieve the following error: ctags: unrecognized option --langdef=arc and I have the following in my ~/.ctags file: --langdef=arc --langmap=arc:.arc --regex-arc=/^\(def ([a-zA-Z1-9_*\/<>-]+)/\1/ --regex-arc=/^\(= ([a-zA-Z1-9_*\/<>-]+)/\1/ --regex-scheme=/^\(xdef ([a-zA-Z1-9_*\/<>-]+)/\1/ 回答1: etags is short for "Emacs tags"