using taglist in vim

来源:互联网 发布:coc黑胖数据 编辑:程序博客网 时间:2024/05/21 03:21

install taglist

install ctags:

sudo apt install ctags
make sure it is exuberant ctags
ctags --version
look path of ctags, usually it is “/usr/bin/ctags”
which ctags

install taglist

download taglist package from http://vim-taglist.sourceforge.net/
mkdir ~/.vim
cd ~/.vim
unzip ~/Downloads/taglist_46.zip
cd ~/.vim/doc
vim taglist.txt
:helptags .
modify ~/.vimrc, add this settings:
let Tlist_Ctags_Cmd="/usr/bin/ctags"
let Tlist_Inc_Winwidth=0

using taglist

:Tlist toggle open or close taglist window
:Tlist same as Tlist
:TlistOpen Open taglist window
:TlistClose Close taglist window
ctrl+ww switch window
:help taglist.txt view help file

commands in taglist window

F1 help/close help
Enter jump to defination
o jump to defination in a new window
p preview
space show prototype
u update list
s sort
d delete taglist of a file
x zoom in / zoom out
- fold
+ open
* open all
= fold all
[[ jum to end of file
]] jump to begin of file
q quit

more settings

let Tlist_Show_One_File=1 show tags for only one file
let Tlist_Exit_OnlyWindow=1 close taglist window if it is the last one
let Tlist_Use_Right_Window=1 show taglist window at right side

other setting parameters

Tlist_Sort_Type
Tlist_Show_Menu
Tlist_Max_Submenu_Items
Tlist_Max_Tag_Length
Tlist_Use_SingleClick
Tlist_Auto_Open
Tlist_Close_On_Select
Tlist_File_Fold_Auto_Close
Tlist_GainFocus_On_ToggleOpen
Tlist_Process_File_Always
Tlist_WinHeight
Tlist_WinWidth
Tlist_Use_Horiz_Window

0 0