vim-rtags


Ⅰ. 插件描述

C++ code navigation in Vim editor.

Ⅱ. 基本信息

创建日期:  2013-12-29
使用用户:  3
Github星:  6
插件作者:  Shane Harper

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'shaneharper/vim-rtags'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'shaneharper/vim-rtags'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'shaneharper/vim-rtags'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/shaneharper/vim-rtags

Ⅳ. 文档说明

vim-rtags

C++ code navigation in Vim editor.

rtags uses clang to find symbol references, definitions, etc.

Setup

Vundle can be used to install and update this plugin.

vim-rtags requires that Vim was compiled with +byte_offset enabled.

The rtags bin directory needs to be in your PATH.

Usage

Note: <localleader> is backslash, unless overridden by maplocalleader.

<localleader>r find references to the symbol under the cursor.
:RtagsFind symbol find definition/declarations of symbol

See ./ftplugin/c.vim to define custom mappings.

The Vim-unimpared plugin can help with navigating the output of vim-rtags. It maps:

  • [l, ]l to move up/down a line in the "location list" window
  • [L, ]L to move to first/last entry, and
  • [<C-L>, ]<C-L> to jump to previous/next file.

To do

  • Make it work when a source file has not been saved. Note: buffers other than the current one may have significant unsaved changes. (A special case exists where a buffer has never been saved.) The simplest solution might be just to save everything that has been modified/created before calling rtags.
  • Automatically start rdm. (rc should start rdm if it can't connect to rdm.)
  • Lots more!

添加新评论