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:
Justin M. Keyes
2013-12-06 15:00:38 -05:00
parent 0d50a1caec
commit 17bfd3b276
2 changed files with 18 additions and 19 deletions

View File

@@ -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 != ''