安装ctags
确认ctags是否安装
$which ctags
安装ctags
$sudo apt install ctags
分别下载并安装如下vim插件
- Taglist:https://www.vim.org/scripts/script.php?script_id=273
- SrcExpl (Source Explorer):https://www.vim.org/scripts/script.php?script_id=2179
- Trinity :https://www.vim.org/scripts/script.php?script_id=2347
将上述地址对应的配置文件写入vimrc
关于热键的配置
确认terminal本身是否与对应热键如F8,F9等冲突。
使用Ctags
使用Ctags为目标项目打tags:
如果是android项目,源代码庞大,需要使用--exclude=命令排除一些目录,如
ctags --exclude=build --exclude=disregard --exclude=poky --exclude=prebuilts --exclude=.repo -R
仅供参考,实际情况看各自需要。