Vim基础知识之ctags 及 Taglist 插件
1. 我的界面
2. ctags
- exuberant ctags是一般Linux系统上缺省的ctags
-
我的ctags版本:Exuberant Ctags 5.9~svn20110310
简单介绍
- Used in at least 50 countries in all 7 continents (including Antarctica!)
- Supports 41 programming languages
- Featured in the book, Learning the vi Editor, a title in the O’Reilly series
- Covered in the March 2001 issue of C++ Users Journal, “Navigating Linux Source Code”
- Praised in the Weekend Mechanic column of the June 1997 issue of Linux Gazette
- Praised in Perl Buzz
- Freely available under the terms of the GNU General Public License
- Included in major Linux distributions
安装方式
sudo apt-get install exuberant-ctags
.vimrc配置
""""""""""""""""""""""""""""""""""
"plugin-->ctags(exuberant-ctags)
""""""""""""""""""""""""""""""""""
set tags=tags
set autochdir
3. taglist
我的ctags版本:Exuberant Ctags 5.9~svn20110310
简单介绍
- Used in at least 50 countries in all 7 continents (including Antarctica!)
- Supports 41 programming languages
- Featured in the book, Learning the vi Editor, a title in the O’Reilly series
- Covered in the March 2001 issue of C++ Users Journal, “Navigating Linux Source Code”
- Praised in the Weekend Mechanic column of the June 1997 issue of Linux Gazette
- Praised in Perl Buzz
- Freely available under the terms of the GNU General Public License
- Included in major Linux distributions
安装方式
- Used in at least 50 countries in all 7 continents (including Antarctica!)
- Supports 41 programming languages
- Featured in the book, Learning the vi Editor, a title in the O’Reilly series
- Covered in the March 2001 issue of C++ Users Journal, “Navigating Linux Source Code”
- Praised in the Weekend Mechanic column of the June 1997 issue of Linux Gazette
- Praised in Perl Buzz
- Freely available under the terms of the GNU General Public License
- Included in major Linux distributions
sudo apt-get install exuberant-ctags
""""""""""""""""""""""""""""""""""
"plugin-->ctags(exuberant-ctags)
""""""""""""""""""""""""""""""""""
set tags=tags
set autochdir
3. taglist
我的taglist版本:4.6
下载
taglist_46.zip 可以到Linux公社资源站下载:
——————————————分割线——————————————
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2017年资料/3月/8日/Vim基础知识之ctags 及 Taglist 插件/
下载方法见 http://www.linuxidc.com/Linux/2013-07/87684.htm
——————————————分割线——————————————
安装
-
解压:得到doc和plugin两个文件夹
-
转移:
//the version of vim on my linux is 7.4
sudo cp doc/taglist.txt /usr/share/vim/vim74/doc/
sudo cp plugin/taglist.vim /usr/share/vim/vim74/plugin/
- .vimrc配置
""""""""""""""""""""""""""""""""""
"plugin-->taglist
""""""""""""""""""""""""""""""""""
let Tlist_Auto_Open=1 "auto open Tlist
let Tlist_Exit_OnlyWindow = 1 "exit Tlist if close sourse file
let Tlist_Show_One_File = 1 "only show current file's Tlist
let Tlist_Compact_Format=1 "Hide help menu
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
taglist命令
ctrl + ww taglist与代码窗口的切换
<CR> 跳到光标下tag所定义的位置,用鼠标双击此tag功能也一样
o 在一个新打开的窗口中显示光标下tag
<Space> 显示光标下tag的原型定义
u 更新taglist窗口中的tag
s 更改排序方式,在按名字排序和按出现顺序排序间切换
x taglist窗口放大和缩小,方便查看较长的tag
+ 打开一个折叠,同zo
- 将tag折叠起来,同zc
* 打开所有的折叠,同zR
= 将所有tag折叠起来,同zM
[[ 跳到前一个文件
]] 跳到后一个文件
q 关闭taglist窗口
<F1> 显示帮助
解压:得到doc和plugin两个文件夹
转移:
//the version of vim on my linux is 7.4
sudo cp doc/taglist.txt /usr/share/vim/vim74/doc/
sudo cp plugin/taglist.vim /usr/share/vim/vim74/plugin/
""""""""""""""""""""""""""""""""""
"plugin-->taglist
""""""""""""""""""""""""""""""""""
let Tlist_Auto_Open=1 "auto open Tlist
let Tlist_Exit_OnlyWindow = 1 "exit Tlist if close sourse file
let Tlist_Show_One_File = 1 "only show current file's Tlist
let Tlist_Compact_Format=1 "Hide help menu
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
ctrl + ww taglist与代码窗口的切换
<CR> 跳到光标下tag所定义的位置,用鼠标双击此tag功能也一样
o 在一个新打开的窗口中显示光标下tag
<Space> 显示光标下tag的原型定义
u 更新taglist窗口中的tag
s 更改排序方式,在按名字排序和按出现顺序排序间切换
x taglist窗口放大和缩小,方便查看较长的tag
+ 打开一个折叠,同zo
- 将tag折叠起来,同zc
* 打开所有的折叠,同zR
= 将所有tag折叠起来,同zM
[[ 跳到前一个文件
]] 跳到后一个文件
q 关闭taglist窗口
<F1> 显示帮助
Vim入门基础知识集锦 http://www.linuxidc.com/Linux/2017-02/140903.htm
Vim入门基础教程 http://www.linuxidc.com/Linux/2017-02/140279.htm
把Vim打造成优秀的C++ IDE http://www.linuxidc.com/Linux/2016-06/132262.htm
Ubuntu 14.04升级Vim7.4到8.0 http://www.linuxidc.com/Linux/2016-11/136816.htm
Vim安装youcompleteme自动补全插件 http://www.linuxidc.com/Linux/2016-11/137665.htm
Linux Vim编辑器使用简单讲解 http://www.linuxidc.com/Linux/2016-12/138930.htm
Ubuntu 16.04 Vim YouCompleteMe自动补全的安装配置与使用 http://www.linuxidc.com/Linux/2017-02/141088.htm
本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-03/141528.htm