linux环境搭建

ctags

1、安装apt-get install ctags

2、配置vimrc

set tags += ./tags, ~/linux-2.6.24.7/tags

setautochdir

3、使用

ctags -R

vim -t tag(如,vim –t main)打开包含该tag的文件

vim下:<c+w+]>stag <name>  <c+]>tag <name>   <c+t>

[s]ts tf 2tp tntl


taglist

vim-addons install taglist


~/.vimrc中添加配置

let Tlist_Ctags_Cmd='/usr/local/bin/ctags‘
let Tlist_Show_One_File=1
let Tlist_OnlyWindow=1
let Tlist_Use_Right_Window=0
let Tlist_Sort_Type='name'
let Tlist_Exit_OnlyWindow=1
let Tlist_Show_Menu=1
let Tlist_Max_Submenu_Items=10
let Tlist_Max_Tag_length=20
let Tlist_Use_SingleClick=0
let Tlist_Auto_Open=0
let Tlist_Close_On_Select=0
let Tlist_File_Fold_Auto_Close=1
let Tlist_GainFocus_On_ToggleOpen=0
let Tlist_Process_File_Always=1
let Tlist_WinHeight=10
let Tlist_WinWidth=58
let Tlist_Use_Horiz_Window=0
nmap tl :TlistToggle<cr>


cscope

apt-get install cscope

配置

nmap <C-x>s :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-x>g :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-x>c :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-x>t :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-x>e :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-x>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-x>i :cs find i <C-R>=eptend("<cfile>")<CR><CR>
nmap <C-x>d :cs find d <C-R>=expand("<cword>")<CR><CR>
cs add cscope.out
 
使用:

cscope -Rbkq
Ctrl-x,然后按下s,则跳转到当前方法的声明处,相当于输入

:cs find s 加上方法名
0 s: 查找C语言符号,即查找函数名、宏、枚举值等出现的地方
1 g: 查找函数、宏、枚举等定义的位置,类似ctags所提供的功能
2 d: 查找本函数调用的函数
3 c: 查找调用本函数的函数
4 t: 查找指定的字符串
6 e: 查找egrep模式,相当于egrep功能,但查找速度快多了
7 f: 查找并打开文件,类似vim的find功能
8 i: 查找包含本文件的文件

scs //new windows

cs help

cs reset

cs show

cs kill <num | partial name>


winManager

1、安装

vim-addons install winmanager

2、配置

 "-- WinManager setting --
let g:winManagerWindowLayout='FileExplorer|TagList' "设置我们要管理的插件
let g:persistentBehaviour=0 "如果所有编辑文件都关闭了,退出vim
nmap wm :WMToggle<cr>

3、使用

wm










  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值