mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-08 03:24:47 +08:00
Add auto-goto command/function
This adds g:jedi#goto_command, and uses `<Leader>d` by default for it - the old default for `g:jedi#goto_definitions_command`, which is now empty. It will try `script.goto_definitions()` first, and falls back to `script.goto_assignments()` for builtins. Closes https://github.com/davidhalter/jedi-vim/pull/407
This commit is contained in:
@@ -7,6 +7,9 @@ endif
|
||||
|
||||
if g:jedi#auto_initialization
|
||||
" goto / get_definition / usages
|
||||
if g:jedi#goto_command != ''
|
||||
execute "nnoremap <buffer> ".g:jedi#goto_command." :call jedi#goto()<CR>"
|
||||
endif
|
||||
if g:jedi#goto_assignments_command != ''
|
||||
execute "nnoremap <buffer> ".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user