~maxgyver83/hare-jump.vim

Hare code navigation in vim

a28ee16 Add keyword: 'done'

5 months ago

83214fe Fix wrong jumps when searching for enum types

11 months ago

#hare-jump.vim

Jump to the definitions of functions, types, variables and constants.

hare-jump uses grep (or ripgrep if available) to find definitions outside the current buffer and takes the $HAREPATH into account.

#Installation

mkdir -p ~/.vim/pack/plugins/start
cd ~/.vim/pack/plugins/start
git clone https://git.sr.ht/~maxgyver83/hare-jump.vim

#Usage

Run :HareJumpToDefinition with the cursor on a symbol. This plugin binds this command to CTRL-] (usually used for ctags which doesn't support Hare yet).

:HareJumpToDefinition symbol works as well.

#Configuration

Bind the Hare jump command to a different key, for example CTRL-t:

nnoremap <buffer><silent> <C-t> :HareJumpToDefinition<CR>

#Set HAREPATH for a project

Set and export HAREPATH before starting vim or set it inside vim. Example:

:let $HAREPATH = '/home/max/repos/madeline:/usr/local/src/hare/stdlib'

(Create a .exrc file for a project specific HAREPATH. This requires set exrc in your .vimrc.)