English / Japanese
Vim plugin for ruby editing. Quick jump to method, class, module defenitions in buffers.
copy rubyjump.vim to your ~/.vim/plugin
directory.
write bellow to your ~/.vimrc
. And execute :BundleInstall
.
Bundle 'xmisao/rubyjump.vim'
RubyJump is tested on Vim 7.4. Ruby interface(if_ruby) is required.
RubyJump add these comamnds to Vim.
- RubyJump
- RubyJumpLocal
- RubyJumpCursor
- RubyJumpNext
- RubyJumpPrev
- RubyJumpForward
- RubyJumpBackward
- RubyJumpNextForward
- RubyJumpPrevBackward
- RubyJumpVersion
Jump to a definition in all windows. Once this command executed, selection window is open above. Enter key pressed, jump to the definition.
In selection window, you can use ambiguous completion.
For example, method named foobar
is matches foo
, bar
, fb
or oo
.
Jump to a definition in current window.
execute RubyJump
with under cursor word.
after RubyJump
or RubyJumpLocal
, if same name definitions are there, jump to next definition.
after RubyJump
or RubyJumpLocal
, if same name definitions are there, jump to previous definition.
This is support command for cursor moving. Move to forward definition.
Move to backward definition.
After jump, this command behaves RubyJumpNext
.
Else, this command behaves RubyJumpForward
.
This command is recommended to move to forward.
After jump, this command behaves RubyJumpPrev
.
Else, this command behaves RubyJumpBackward
.
This command is recommended to move to backward.
Show RubyJump's version information.
RubyJump provides these keymaps to Vim. Keymaps are obverse commands.
Keymap | Command |
---|---|
<Plug>(rubyjump) | RubyJump |
<Plug>(rubyjump_local) | RubyJumpLocal |
<Plug>(rubyjump_cursor) | RubyJumpCursor |
<Plug>(rubyjump_next) | RubyJumpNext |
<Plug>(rubyjump_prev) | RubyJumpPrev |
<Plug>(rubyjump_forward) | RubyJumpForward |
<Plug>(rubyjump_backward) | RubyJumpBackward |
<Plug>(rubyjump_next_forward) | RubyJumpNextForward |
<Plug>(rubyjump_prev_backward) | RubyJumpPrevBackward |
RubyJump use these variables.
- g:rubyjump#debug
- g:rubyjump#enable_ripper
- g:rubyjump#filetypes
If set to 1
, debug mode is enabled.
Default value is 0
.
If set to 1
, RubyJump use ripper. ripper is parser of Ruby.
If this option enabled, first RubyJump challenge parsing by ripper, if parse error detected, then parse by regular expression.
This option requires over Ruby 1.9.
Default value is 1
in over Ruby 1.9 environment, 0
in under Ruby 1.8 environment.
Specify buffer filetypes that jump target as string array.
Default value is ['ruby']
.
" for RubyJump
" Disable debug mode
g:rubyjump#debug = 0
" Keymaps
" <Space> execute RubyJump
" ; execute RubyJumpCursor
" Ctrl + n Move to next or forward definition
" Ctrl + p Move to previous or backward definition
nmap <silent> <Space> <Plug>(rubyjump)
nmap <silent> <C-n> <Plug>(rubyjump_next_forward)
nmap <silent> <C-p> <Plug>(rubyjump_prev_backward)
nmap <silent> ; <Plug>(rubyjump_cursor)