opengrok interface for vim
Vim script
Latest commit b82f3eb Jun 4, 2016 @asenac Open existing buffer
Failed to load latest commit information.
autoload Open existing buffer Jun 4, 2016
doc Add doc file. Nov 18, 2015

vim-opengrok: opengrok interface for vim

Inspired by youngker/eopengrok.el

vim-opengrok screenshot


Plugin 'asenac/vim-opengrok'


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


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.


:OgIndex /path/to/index

Creates an index for the directory specified.


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


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


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


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