免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1535 | 回复: 0
打印 上一主题 下一主题

a easy method to config vim on ubuntu [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-02 12:12 |只看该作者 |倒序浏览
下面的方法是如何在 ubuntu 环境里建立如同source insight 的代码浏览与编辑环境
1. 安装相关的应用程序
sudo apt-get install vim gvimsudo apt-get install cscopesudo apt-get install ctags
2. 解压并拷贝附件中的文档
2.1 unzip the attach file - vim-config-amuhong.tgz.
sudo tar zxvf vim-config-amuhong.tar.gz
then you can see one hiden file and one hiden folder.
derek:~/documents/vim-config-amuhong$ la.vim  .vimrc
2.2 copy the unzipped file to the target folder.
copy the files to /home//
3. 修改 .bashrc 文件
3.1 please remember to add the below two lines to /home//.bashrc
alias mkctags='rm -f tags; find . -name "*.[ch]" -or -name "*.cpp" -or -name "*.java"  | ctags -L-'alias mkcscope='rm -f cscope.in.out; rm -f cscope.out; rm -f cscope.po.out; find ./ -name "*.c" -or -name "*.h" -or -name "*.cpp" -or -name "*.java" -or -name "*.S" | cscope -Rbq'
3.2 and then reboot the terminal to enable what you have modified.
4. 如何使用
now you can enjoy what you have done.
for example, there is a code folder in /usr/src/soucecd /usr/src/soucemkctags;mkcscopegvim code
now what you see should be like the interface of source insight.
you can refer to .vimrc file for the detailed usage.
for example
cs find g  to find the define of this function.cs find f  to find a file.
and press some key such as F3/F4/F7/F8/... to enable/disable some windows.

       
        文件:vim-config-amuhong.tar.gz
        大小:82KB
        下载:
下载
       

               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/103613/showart_2043751.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP