1 cscope

1.1 软件安装

apt-get install cscope

1.2 ~/.vimrc Settings

1.2.1 Cscope Settings

Copy the following comment to ~/.vimrc

以下的"(左双引号)后面的表示注释

例如:" add any database in current directory

if has("cscope")

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

1.2.2 Remember Last Location

Copy the following comment to ~/.vimrc

if has("autocmd")

au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")

\| exe "normal g'\"" | endif

endif

1.2.3 Syntax Color off

Copy the following comment to ~/.vimrc

以下的"(左双引号)后面的表示注释

例如:"4 space, not Tab

hi comment ctermfg=6

syntax off

"4 space, not Tab

set tabstop=4

autocmd FileType c,cpp,h,java set shiftwidth=4 | set expandtab

1.2.4 Show the Whitespace

Copy the following comment to ~/.vimrc

以下的"(左双引号)后面的表示注释

例如:" whitespace

" whitespace

highlight whitespaceEOF ctermbg=red guibg=red

match whitespaceEOF /\s\+$/

1.3 不显示shell提示符前面过长的文件路径

@ ~/.bashrc Setting

Copy the following comment to ~/.bashrc

1.4 Support CPP and Java

# 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

1.5 Vim快捷键

选中多行,复制,粘贴:Shift + v, y, p

选中多列,复制,粘贴:Ctrl + v, y, p

函数跳转:Ctrl + ]

函数跳转返回:Ctrl + o

跳到第一行: :0

跳到最后一行: :$

比较:vimdiff  file1 file2

vimdiff 2个窗口互相跳转:ctrl + 按2次w键

vim以16进制查看文件:”: %!xxd”

字符串替换::%s/oldstring/newstring/g

查找谁调用symbol::cs find c 查找symbol出现的地方::cs find s 查找指定的文件::cs find f

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”

3 sed - Stream Editor

3.1 Linux命令之sed批量替换字符串操作

使用的格式如下:

sed -i "s/oldstring/newstring/g" `grep oldstring -rl path`

其中,oldstring是待被替换的字符串,newstring是待替换oldstring的新字符串,grep操作主要是按照所给的路径查找oldstring,path是所替换文件的路径;

-i选项是直接在文件中替换,不在终端输出;

-r选项是所给的path中的目录递归查找;

-l选项是输出所有匹配到oldstring的文件;

4 tmux

4.1 安装工具

在ubuntu系统中使用sudo apt-get install tmux安装tmux工具

4.2 使用工具

输入命令tmux使用工具

-上下分屏:ctrl + b  再按 "

-左右分屏:ctrl + b  再按 %

-切换屏幕:ctrl + b  再按o

-关闭一个终端:ctrl + b  再按x

-上下分屏与左右分屏切换: ctrl +b  再按空格键

linux cscope界面,Linux cscope代码阅读工具配置相关推荐

  1. Linux平台下QtCreator集成代码静态分析工具clang-tidy和Clazy

    Linux平台下QtCreator集成代码静态分析工具clang-tidy和Clazy 原文连接: https://blog.csdn.net/wsj18808050/article/details/ ...

  2. 与sourceinsight媲美的代码阅读工具

    与sourceinsight媲美的代码阅读工具 与sourceinsight媲美的代码阅读工具 - Fred的专栏 - 博客频道 - CSDN.NET 与sourceinsight媲美的代码阅读工具 ...

  3. 代码阅读工具学习总结

    代码阅读工具:Source Navigator和Source Insight 一.Source Insight实用技巧: Source Insight(下文的SI指的也是它)就是这样的一个东西: Wi ...

  4. 图形化代码阅读工具——Scitools Understand

    Scitools出品的Understand 2.0.用了很多年了,比Source Insight强大很多.以前的名字叫Understand for C/C++,Understand for Java, ...

  5. 代码阅读工具强大的代码阅读工具Understand

    1.强大的代码阅读工具Understand http://www.scitools.com/ Understand软件的功能主要定位于代码的阅读理解. 软件特性: 1.支持多语言:Ada, C, C+ ...

  6. 向大家介绍一款代码阅读工具——Scitools Understand

    不知道大家在平时看代码写代码都使用什么工具? 在以前在windows下我一般使用VS2008,其实我觉得VS做的还是很好的,它在调试方面的功能很强大,可以很好的查看变量的值,以及内存中的变化状况.现在 ...

  7. 《深入分析GCC 》——第2章 GCC源代码分析工具2.1 vim+ctags代码阅读工具

    本节书摘来自华章出版社<深入分析GCC >一书中的第1章,第2.1节,作者 王亚刚 ,更多章节内容可以访问云栖社区"华章计算机"公众号查看. 第2章 GCC源代码分析工 ...

  8. ubuntu 9.04/9.10 下代码阅读工具 kscope 的安装

    转载时请注明出处和作者联系方式:http://blog.csdn.net/mimepp 作者联系方式:YU TAO <yut616 at sohu dot com> 关键字:ubuntu, ...

  9. java 代码阅读工具_java-tracer

    java-tracer 是一个 Java 源码阅读工具,利用它可以把我们程序运行过程栈录制下来,并实时绘制成时序图,使用简单方便. 工具效果 java-tracer 主要提供[线程]方法调用栈时序图录 ...

最新文章

  1. 聊城高级财经计算机应用升学,聊城高级财经职业学校成功承办省级职业技能大赛赛项...
  2. 802.11ac标准简介
  3. 信用卡不能提额,是因为使用了招联金融吗?
  4. 判断请求来自手机还是PC
  5. c语言课题设计字符串处理函数报告,C语言输入输出库函数设计实验报告.doc
  6. mui-scroll-wrapper mui-scroll 内容增多不出滚动条
  7. cesium 知乎_Cesium 源码笔记[2] CesiumWidget模块的实例化过程 ver1.67
  8. 十分钟快速了解《你不知道的 JavaScript》(上卷)
  9. pthreads v3下的worker和pool的使用
  10. 【操作系统】实时调度
  11. 二进制转换成格雷码的方式
  12. BOF算法 基于SIFT+KMeans
  13. 希尔贝壳受邀参会IEEE SLT 2021
  14. h5物体拖动_iH5高级教程:H5交互进阶,拖动物品效果
  15. Live800:在线客服系统排名是怎么样的?
  16. 10道字节跳动C++/Java笔试真题你能做对几道?3道就赢了80%的竞争者(含答案)
  17. Python操纵Word神器——python-docx大全(含插入pptx图表)
  18. Ubuntu内网穿透搭建网站:设置跳转本地网页服务 6/17
  19. php是什么化学物,dmap是什么化学物质以及它的性质用途
  20. lcg_magic算法笔记:冒泡排序

热门文章

  1. Python-魔法函数
  2. 网址在线封装APK系统源码
  3. plotly可视化绘制双坐标轴图
  4. 使用Protege构建知识图谱
  5. 基于java的校园网站设计
  6. 红外图像非均匀矫正——两点矫正
  7. 电脑上的计算机教学反思,电脑网络教学反思
  8. 个人介绍主页制作简单的(html css js)
  9. 微信小程序 java停车场车位管理系统python-php
  10. HTML5+CSS期末大作业:宠物网站设计——宠物猫(10页) DIV+CSS宠物网页设计代码