|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
您现在的位置: ChinaBeta.cn 中文IT资讯 >> 操作系统 >> Liunx|UNIX >> 操作系统正文
Linux用Vim+Taglist+Ctags阅读编辑代码
Www.ChinaBeta.Cn 更新时间:2008-1-21

【ChinaBeta.Cn 操作系统中心】
 

其实这套组合很实用了 基本上到了不用鼠标的source insight境界了,最重要的是可以在text模式下运行

使用的平台是Fedora 8

Vim和Ctags在F8安装完后系统已经具备

Taglist需要自己下载

1.下载一个Taglist的zip文件,然后解压缩,将taglist.vim复制到~/.vim/plugin目录下。

2.修改~/.vim/plugin/taglist.vim

在 if !exists('loaded_taglist')上面加入

let Tlist_Ctags_Cmd="/usr/bin/ctags"

结果为:

" Line continuation used here
let s:cpo_save = &cpo
set cpo&vim

let Tlist_Ctags_Cmd="/usr/bin/ctags"

if !exists('loaded_taglist')
" First time loading the taglist plugin
"
" To speed up the loading of Vim, the taglist plugin uses autoload
" mechanism to load the taglist functions.
" Only define the configuration variables, user commands and some
" auto-commands and finish sourcing the file

" The taglist plugin requires the built-in Vim system() function. If this
" function is not available, then don't load the plugin.
if !exists('*system')
echomsg 'Taglist: Vim system() built-in function is not available. ' .
\ 'Plugin is not loaded.'
let loaded_taglist = 'no'
let &cpo = s:cpo_save
finish
endif

此时Ctags和Taglist已经结合起来。

3.在相应的源码目录运行ctags -R产生相应的tags文件

4.将tags文件在vim运行时导入。可以修改~/.vimrc,以后每次启动vim将自动导入此tags文件

:set tags=/root/develop/honeyids/tags

并设置语法高亮

syntax enable

syntax on

5.运行vim, 激活Taglist时用:TaglistToggle命令。在左边的tags区域和正常编辑区域切换时用ctrl+2个w。

6.使用ctags时, ctrl+]可查看函数的定义。 ctrl+o返回源文件。

Google

(责任编辑:hahack)

发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
热门文章 相关报道
普通操作系统 [Liunx|UNIX]Linux用Vim+Taglist+Ctags阅读编… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]嵌入式Linux系统下的网页浏览器 … (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]在VMware中Fedora Linux 8系统增… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]SUSE Linux subversion独立服务器… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]Ubuntu 7.10不能正常播放网页上F… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]硬盘安装 openSUSE Linux 10.3操… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]在Fedora Linux 8下配置AC97声卡… (01-21)最新操作系统
普通操作系统 [Liunx|UNIX]新手学堂:Ubuntu Linux系统的目… (01-21)最新操作系统
普通操作系统 [Windows Server 2008]Windows Server 2008 口号已出 发… (01-21)最新操作系统
普通操作系统 [Vista]Vista SP1、XP SP2性能全方位对比 (01-18)最新操作系统
  • 嵌入式Linux系统下的网页浏…

  • 在VMware中Fedora Linux 8系…

  • SUSE Linux subversion独立…

  • Ubuntu 7.10不能正常播放网…

  • 硬盘安装 openSUSE Linux 1…

  • 在Fedora Linux 8下配置AC9…

  • Linux+Apache+PHP+JSP 的Re…

  • Solaris Linux 9下Vsftpd的…

  • RHEL5.0操作系统下NFS服务的…

  • 在虚拟机Redhat Linux下安装…

  •   网友评论内容:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    I D *
    邮 箱
    主 页
    评 分 1分 2分 3分 4分 5分
    评 论

    关于我们  中国·国家信息产业部{粤ICP备06006652号}{陇ICP备06002562号}
    版权所有:『AK网盟基地』站长:Hahack | QQ:80505955 | E-mail:Hahack@Gmail.com
    Copyright (C) 2005-2007  akhack.org|chinabeta.cn All Rights Reserved