为VC系统头文件生成tags
2012-08-30 22:15
169 查看
@echo off rem 用法:把些文件命名为vctag.bat,放在系统目录下,在命令行中运行vctag filename rem 功能:本批处理是针对VC编写的。为filename的include树中的所有文件,在当前目录,生成tags文件,方便其它编辑器(如VIM)使用。 rem 备注:此文件依赖于CTAGS工具和VC编译器。ctags官网http://ctags.sourceforge.net;VC方面,需要手动指定编译器环境配置文件,即下面的vcvarsall.bat文件 rem 如果当前目录已经存在tags文件,则把头文件的tags附加到原有tags中,否则为filename生成tags,再附加 if "%1"=="" ( goto errorL ) rem 配置环境变量,不一定相同,用户根据自己情况手动指定批处理文件 call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 cd /d %~dp1 rem del /Q /S tags 1>nul 2>nul if not exist "tags" ( call ctags %1 ) setlocal enabledelayedexpansion for /f "tokens=3,4 delims=:" %%i in ('cl /Zs /nologo /showIncludes %1') do ( set "str=%%i:%%j" rem 清除路径前面的空格 for /f "tokens=1* delims= " %%i in ("!str!") do ( set "str=%%i %%j" ) rem 如果使用start替换call,会出现多进程同步问题,所以用call call ctags --append=yes "!str!" ) goto end :errorL echo Source file lose! echo Usage: vctag filename :end
GVIM下的用法:
用GVIM打开你要处理的源文件,再运行:!vctag %
相关文章推荐
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- ctags为系统头文件目录生成tags
- 为系统头文件目录生成tags
- ctags 为系统相关头文件生成tags
- 用ctags为linux系统头文件生成systags
- ffmpeg 转换VC工具已经可以生成工程文件(续)
- qmake生成vc2010工程文件
- 系统找不到指定的文件。 Project : error PRJ0019: 工具从"正在执行生成后事件..."
- 生成静态文件的新闻系统核心代码(.net C#)
- VC生成静态库release版比debug版库文件尺寸更大的原因
- 在Ubuntu系统使用Texlive生成PDF文件命令
- 使VC生成最小的可执行文件
- 生成静态文件的新闻系统核心代码(.net C#)
- 【xml】商城系统中将所有的产品链接地址生成到一个xml文件中,便于搜索引擎蜘蛛抓取
- 系统崩溃时怎样生成核心内存转储文件
- Win7-64位系统中VC++ 6.0打开文件崩溃解决办法
- VC生成DICOM文件及 DICOM,DVT,DCMTK开发知识汇总