# vim **Repository Path**: dangxiwang/vim ## Basic Information - **Project Name**: vim - **Description**: vim config ctags cscope - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-05-28 - **Last Updated**: 2021-12-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vim #### 介绍 vim config ctags cscope #### 软件架构 vim插件配置,包含插件:delimitMate、indentLine、taglist、The-NERD-tree、vim-airline、YouCompleteMe和Vundle config目录:存放配置文件 scripts目录:存放脚本 #### 安装教程 1.安装vim sudo apt install vim 2.安装ctags和cscope sudo apt install universal-ctags cscope 3.在用户目录下创建~/.vim/bundle目录,在目录中执行以下命令 git clone https://github.com/vim-scripts/delimitMate.vim.git git clone https://github.com/vim-scripts/indentLine.vim.git git clone https://github.com/vim-scripts/taglist.vim.git git clone https://github.com/vim-scripts/The-NERD-tree.git git clone https://github.com/vim-airline/vim-airline.git git clone https://github.com/VundleVim/Vundle.vim.git git clone https://github.com/ycm-core/YouCompleteMe.git git clone https://github.com/vim-scripts/cscope.vim.git 4.将config/.vimrc拷贝到用户目录下~/.vimrc 5.安装插件 进入vim,执行PluginInstall 6.插件YouCompleteMe需要编译安装 a. 安装必要的编译环境 sudo apt install build-essential python3-dev cmake b. 安装其他编程语言环境,也可以等编译报错了再安装 sudo apt install golang-go npm c. 编译所有的语言支持 cd YouCompleteMe git submodule update --init --recursive python3 install.py --all d.编译部分语言支持,比如c++ python3 install.py --clangd-completer #### 使用说明 1.ctags使用 将scripts/taglist拷贝到可执行目录,在源码根目录执行taglist生成tags,使用vim打开源码中的文件,可自动加载tags文件 在vim界面按F4显示taglist界面 Ctrl + o 后退 Ctrl + ] 跳转 Ctrl + ww 光标窗口跳转 2.The NerdTree使用 在vim界面按F2 3.生成ctags和cscope索引 在vim界面按F10生成tags索引 在vim界面按F12生成cscope.out索引 4.cscope使用 add : Add a new database (Usage: add file|dir [pre-path] [flags]) find : Query for a pattern (Usage: find a|c|d|e|f|g|i|s|t name) a: Find assignments to this symbol c: Find functions calling this function d: Find functions called by this function e: Find this egrep pattern f: Find this file g: Find this definition i: Find files #including this file s: Find this C symbol t: Find this text string help : Show this message (Usage: help) kill : Kill a connection (Usage: kill #) reset: Reinit all connections (Usage: reset) show : Show connections (Usage: show) #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)