Cscope How-to
来源:互联网 发布:支付宝和淘宝怎么更换 编辑:程序博客网 时间:2024/06/04 19:45
apt-get install cscope
1.1 ~/.vimrc Settings
1.1.1 Cscope SettingsCopy the following comment to ~/.vimrc
以下的"(左双引号)后面的表示注释
例如:" add any database in current directory
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
Copy the following comment to ~/.vimrc
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
Copy the following comment to ~/.vimrc
以下的"(左双引号)后面的表示注释
例如:"4 space, not Tab
syntax off
"4 space, not Tab
set tabstop=4
autocmd FileType c,cpp,h,java set shiftwidth=4 | set expandtab
Copy the following comment to ~/.vimrc
以下的"(左双引号)后面的表示注释
例如:" whitespace
" whitespace
highlight whitespaceEOF ctermbg=red guibg=red
match whitespaceEOF /\s\+$/
Copy the following comment to ~/.bashrc
# find ./ -name *.cpp > cscope.files
# find ./ -name *.hpp >> cscope.files
# find ./ -name *.c >> cscope.files
# find ./ -name *.h >> cscope.files
# find ./ -name *.java >> cscope.files
# cscope –kbRq
选中多行,复制,粘贴:Shift + v, y, p
选中多列,复制,粘贴:Ctrl + v, y, p
函数跳转:Ctrl + ]
函数跳转返回:Ctrl + o
跳到第一行: :0
跳到最后一行: :$
2 Taglist
2.1 Download taglist.vim from Internet
需要注册账号
2.2 Install
2.2.1 ~/.vimrc Setting
Copy the following comment to ~/.vimrc
以下的"(左双引号)后面的表示注释
例如:" show Tlist always
" show Tlist always
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Auto_Open=1
let Tlist_WinWidth=30
2.2.2 taglist.vim
mkdir ~/.vim/plugin
cp taglist.vim ~/.vim/plugin
2.2.3 taglist快捷键
跳到左边函数list窗口:ctrl + 按2次w键
跳到右边源码窗口:选择函数,按回车键
当左边函数list窗口被关闭时,可以在vim中用如下命令打开:“:TlistOpen”
需要关闭左边函数list窗口时,可以在vim中用如下命令关闭:“:TlistClose”;
或者使用 ” ctrl + 按2次w键“ 跳转到左边窗口,然后输入如下命令:“:q”
- Cscope How-to
- Cscope how to support java and c++
- how to ...
- cscope
- cscope
- cscope
- cscope
- cscope
- cscope
- cscope
- cscope
- cscope
- Cscope
- cscope
- Cscope
- cscope
- Siebel HOW TO: How to Deactivate Workflow
- Siebel HOW TO: How to create Products?
- java字符串声明
- 刷清橙OJ--A1027.报时助手
- Matlab 对路径的操作及读写文件
- poj 3107 Godfather(树的重心)
- Python基础概念_5_函数
- Cscope How-to
- 指针为何不能修改其指向的常量字符串
- 百度地图自定义icon,定位偏移问题
- 笔记-Kaggle竞赛入门
- java进阶学习计划
- 用代码操纵剪切板
- Linux常用命令(一)--系统命令
- Ajax等待返回结果时,弹出一个友好的等待提示
- 【Hbase异常】windows 中使用hbase 异常:java.io.IOException: Could not locate executable null\bin\winutils.exe