Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6478436
  • 博文数量: 579
  • 博客积分: 1548
  • 博客等级: 上尉
  • 技术积分: 16635
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-12 15:29
个人简介

http://www.csdn.net/ http://www.arm.com/zh/ https://www.kernel.org/ http://www.linuxpk.com/ http://www.51develop.net/ http://linux.chinaitlab.com/ http://www.embeddedlinux.org.cn http://bbs.pediy.com/

文章分类

全部博文(579)

文章存档

2018年(18)

2015年(91)

2014年(159)

2013年(231)

2012年(80)

分类: 嵌入式

2014-12-16 19:45:33

在source insight中想必大家很习惯预览功能了,现在就给大家带来一个这样的vim插件,我刚实验了一下,效果非常好。

1.yaourt -S vim-srcexpl

2.在.vimrc中添加如下内容:

" // The switch of the Source Explorer 
nmap :SrcExplToggle 

" // Set the height of Source Explorer window 
let g:SrcExpl_winHeight = 8 

" // Set 100 ms for refreshing the Source Explorer 
let g:SrcExpl_refreshTime = 100 

" // Set "Enter" key to jump into the exact definition context 
" let g:SrcExpl_jumpKey = "

" // Set "Space" key for back from the definition context 
let g:SrcExpl_gobackKey = "

" // In order to Avoid conflicts, the Source Explorer should know what plugins 
" // are using buffers. And you need add their bufname into the list below 
" // according to the command ":buffers!" 
let g:SrcExpl_pluginList = [ 
        \ "__Tag_List__", 
        \ "_NERD_tree_", 
        \ "Source_Explorer" 
    \ ] 

" // Enable/Disable the local definition searching, and note that this is not 
" // guaranteed to work, the Source Explorer doesn't check the syntax for now. 
" // It only searches for a match with the keyword according to command 'gd' 
let g:SrcExpl_searchLocalDef = 1 

" // Do not let the Source Explorer update the tags file when opening 
let g:SrcExpl_isUpdateTags = 0 

" // Use 'Exuberant Ctags' with '--sort=foldcase -R .' or '-L cscope.files' to 
" //  create/update a tags file 
let g:SrcExpl_updateTagsCmd = "ctags --sort=foldcase -R ." 

" // Set "" key for updating the tags file artificially 
let g:SrcExpl_updateTagsKey = "

3.简单解释下用法,启动vim,用F8快捷键打开或者关闭预览窗口 回车跳转到定义的文本,空格跳转回来
最终效果如图:

2011年05月11日 - shenhao0129 - Camus
 
阅读(10426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~