vim-opengrok


Ⅰ. 插件描述

opengrok interface for vim

Ⅱ. 基本信息

创建日期:  2015-10-29
使用用户:  1
Github星:  33
插件作者:  Andrés Senac

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-opengrok: opengrok interface for vim

Inspired by youngker/eopengrok.el

vim-opengrok screenshot

Installation

Plugin 'asenac/vim-opengrok'

Requeriments

Note: vim-opengrok uses opengrok's command line tools but it does not require to
have opengrok's web application deployed.

Configuration

Add the following lines to your vimrc using the appropriate routes:

let g:opengrok_jar = '/path/to/opengrok/lib/opengrok.jar'
let g:opengrok_ctags = '/path/to/ctags'

vim-opengrok can use either a per-project index, created in a directory called
.opengrok within the root directory of the project by using :OgIndex
command, or an external index by defining g:opengrok_config_file variable
pointing to the configuration.xml file. For example, for using the same index
for both opengrok's web application and vim-opengrok, you might want to add the
following to your vimrc file:

let g:opengrok_config_file = '/var/opengrok/etc/configuration.xml'

Note: vim-opengrok will fallback on g:opengrok_config_file variable if no
index directory is found in the directory tree of the current working directory.

Commands

:OgIndex /path/to/index

Creates an index for the directory specified.

:OgReIndex

Updates the index that contains the current directory.

:OgSearch [f|d|r|p]

Searches in the index and displays the results in Vim's location list. A prompt
is displayed to introduce the text to search. Supported queries:

  • d - Symbol Definitions
  • r - Symbol References
  • p - Path
  • f - Full text
:OgSearchCWord

Searches word under the cursor and displays the results in Vim's location list.

:OgMode

Interactive queries displaying the results in a special buffer (see screenhost
above).

Limitations

Currently vim-opengrok displays only the first chunk of results returned by opengrok.

添加新评论