mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 19:24:36 +08:00
fix #223: nnoremap instead of noremap
- mapping operator-pending-mode and selection-mode has undesirable
side-effects, and isn't actually used by jedi-vim.
- also, wrap 'for' loops in s:init() functions to avoid polluting the
global namespace ('for key in keys' assigns g:key).
This commit is contained in:
@@ -8,17 +8,17 @@ endif
|
||||
if g:jedi#auto_initialization
|
||||
" goto / get_definition / usages
|
||||
if g:jedi#goto_assignments_command != ''
|
||||
execute "noremap <buffer>".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||
execute "nnoremap <buffer> ".g:jedi#goto_assignments_command." :call jedi#goto_assignments()<CR>"
|
||||
endif
|
||||
if g:jedi#goto_definitions_command != ''
|
||||
execute "noremap <buffer>".g:jedi#goto_definitions_command." :call jedi#goto_definitions()<CR>"
|
||||
execute "nnoremap <buffer> ".g:jedi#goto_definitions_command." :call jedi#goto_definitions()<CR>"
|
||||
endif
|
||||
if g:jedi#usages_command != ''
|
||||
execute "noremap <buffer>".g:jedi#usages_command." :call jedi#usages()<CR>"
|
||||
execute "nnoremap <buffer> ".g:jedi#usages_command." :call jedi#usages()<CR>"
|
||||
endif
|
||||
" rename
|
||||
if g:jedi#rename_command != ''
|
||||
execute "noremap <buffer>".g:jedi#rename_command." :call jedi#rename()<CR>"
|
||||
execute "nnoremap <buffer> ".g:jedi#rename_command." :call jedi#rename()<CR>"
|
||||
endif
|
||||
" documentation/pydoc
|
||||
if g:jedi#documentation_command != ''
|
||||
|
||||
Reference in New Issue
Block a user