From bd68a98848b8082445d70fd00488b20f661cf6f6 Mon Sep 17 00:00:00 2001 From: justinmk Date: Thu, 5 Dec 2013 19:08:57 -0500 Subject: [PATCH 1/8] fix doc tag reference --- doc/jedi-vim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/jedi-vim.txt b/doc/jedi-vim.txt index 20c1140..4a85614 100644 --- a/doc/jedi-vim.txt +++ b/doc/jedi-vim.txt @@ -19,7 +19,7 @@ Contents *jedi-vim-contents* 2.3. Using Vundle |jedi-vim-installation-vundle| 3. Supported Python features |jedi-vim-support| 4. Usage |jedi-vim-usage| -5. Mappings |jedi-vim-mappings| +5. Mappings |jedi-vim-keybindings| 5.1. Start completion |g:jedi#completions_command| 5.2. Go to assignment |g:jedi#goto_assignments_command| 5.3. Get original definition |g:jedi#get_definitions_command| @@ -291,7 +291,7 @@ Upon initialization, jedi-vim performs the following steps: 1. Set the current buffers 'omnifunc' to its own completion function `jedi#complete` -2. Create mappings to commands specified in |jedi-vim-mappings| +2. Create mappings to commands specified in |jedi-vim-keybindings| 3. Call `jedi#configure_call_signatures()` if `g:jedi#show_call_signatures` is set From 493d89302aafc1891514b68b63ab78cce39cd142 Mon Sep 17 00:00:00 2001 From: justinmk Date: Thu, 5 Dec 2013 20:12:14 -0500 Subject: [PATCH 2/8] Update AUTHORS.txt --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index d7b6da5..46efd64 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -35,6 +35,7 @@ Stephen J. Fuhry (@fuhrysteve) Sheng Yun (@ShengYun) Yann Thomas-Gérard (@inside) Colin Su (@littleq0903) +Justin M. Keyes (@justinmk) @something are github user names. From e8b9fcb5d1d4759a0ae186ea374ebcb3df47742d Mon Sep 17 00:00:00 2001 From: Sheng Yun Date: Sat, 7 Dec 2013 00:22:52 +0800 Subject: [PATCH 3/8] Disable dot mapping at initialization if completion_enable is 0 --- ftplugin/python/jedi.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index f1a69d6..1260487 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -29,7 +29,9 @@ if g:jedi#auto_initialization call jedi#configure_call_signatures() endif - inoremap . .=jedi#complete_string(1) + if g:jedi#completions_enabled == 1 + inoremap . .=jedi#complete_string(1) + endif if g:jedi#auto_close_doc " close preview if its still open after insert From 17bfd3b2765d7a092b089e0bd5c19cb6cbb2ef55 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 6 Dec 2013 15:00:38 -0500 Subject: [PATCH 4/8] 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). --- autoload/jedi.vim | 29 ++++++++++++++--------------- ftplugin/python/jedi.vim | 8 ++++---- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 201a8e3..1d6cb9f 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -197,7 +197,6 @@ endfunction " ------------------------------------------------------------------------ " deprecations " ------------------------------------------------------------------------ - let s:deprecations = { \ 'get_definition_command': 'goto_definitions_command', \ 'goto_command': 'goto_assignments_command', @@ -207,18 +206,9 @@ let s:deprecations = { \ 'show_function_definition': 'show_call_signatures', \ } -for [key, val] in items(s:deprecations) - if exists('g:jedi#'.key) - echom "'g:jedi#".key."' is deprecated. Please use 'g:jedi#".val."' instead. Sorry for the inconvenience." - exe 'let g:jedi#'.val.' = g:jedi#'.key - end -endfor - - " ------------------------------------------------------------------------ " defaults for jedi-vim " ------------------------------------------------------------------------ - let s:settings = { \ 'use_tabs_not_buffers': 1, \ 'use_splits_not_buffers': 1, @@ -240,12 +230,21 @@ let s:settings = { \ 'completions_enabled': 1 \ } -for [key, val] in items(s:settings) - if !exists('g:jedi#'.key) - exe 'let g:jedi#'.key.' = '.val - endif -endfor +function! s:init() + for [key, val] in items(s:deprecations) + if exists('g:jedi#'.key) + echom "'g:jedi#".key."' is deprecated. Please use 'g:jedi#".val."' instead. Sorry for the inconvenience." + exe 'let g:jedi#'.val.' = g:jedi#'.key + end + endfor + for [key, val] in items(s:settings) + if !exists('g:jedi#'.key) + exe 'let g:jedi#'.key.' = '.val + endif + endfor +endfunction +call s:init() " ------------------------------------------------------------------------ " Python initialization diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index 1260487..938b10c 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -8,17 +8,17 @@ endif if g:jedi#auto_initialization " goto / get_definition / usages if g:jedi#goto_assignments_command != '' - execute "noremap ".g:jedi#goto_assignments_command." :call jedi#goto_assignments()" + execute "nnoremap ".g:jedi#goto_assignments_command." :call jedi#goto_assignments()" endif if g:jedi#goto_definitions_command != '' - execute "noremap ".g:jedi#goto_definitions_command." :call jedi#goto_definitions()" + execute "nnoremap ".g:jedi#goto_definitions_command." :call jedi#goto_definitions()" endif if g:jedi#usages_command != '' - execute "noremap ".g:jedi#usages_command." :call jedi#usages()" + execute "nnoremap ".g:jedi#usages_command." :call jedi#usages()" endif " rename if g:jedi#rename_command != '' - execute "noremap ".g:jedi#rename_command." :call jedi#rename()" + execute "nnoremap ".g:jedi#rename_command." :call jedi#rename()" endif " documentation/pydoc if g:jedi#documentation_command != '' From 7b8e6bd6eda94b213c804954c6294e0d01c941f2 Mon Sep 17 00:00:00 2001 From: nagev Date: Wed, 11 Dec 2013 15:38:35 +0000 Subject: [PATCH 5/8] Update AUTHORS.txt --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index 46efd64..26f41e4 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -36,6 +36,7 @@ Sheng Yun (@ShengYun) Yann Thomas-Gérard (@inside) Colin Su (@littleq0903) Justin M. Keyes (@justinmk) +nagev (@np1) @something are github user names. From e324a34c69f758daff0cf8c2c6162f230badeaf0 Mon Sep 17 00:00:00 2001 From: nagev Date: Wed, 11 Dec 2013 15:43:18 +0000 Subject: [PATCH 6/8] Update jedi-vim.txt correction in help text for jedi#goto_definitions_command --- doc/jedi-vim.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/jedi-vim.txt b/doc/jedi-vim.txt index 4a85614..08daf04 100644 --- a/doc/jedi-vim.txt +++ b/doc/jedi-vim.txt @@ -22,7 +22,7 @@ Contents *jedi-vim-contents* 5. Mappings |jedi-vim-keybindings| 5.1. Start completion |g:jedi#completions_command| 5.2. Go to assignment |g:jedi#goto_assignments_command| - 5.3. Get original definition |g:jedi#get_definitions_command| + 5.3. Get original definition |g:jedi#goto_definitions_command| 5.4. Show documentation |g:jedi#documentation_command| 5.5. Rename variables |g:jedi#rename_command| 5.6. Show name usages |g:jedi#usages_command| @@ -238,9 +238,9 @@ following module structure: > def bar(): pass -The `jedi#goto_definitions()` function will take you to the "from file2 import foo" -statement in file1.py, while the `jedi#goto_definitions()` function will take -you all the way to the "def bar():" line in file3.py. +The `jedi#goto_assignments()` function will take you to the "from file2 import +foo" statement in file1.py, while the `jedi#goto_definitions()` function will +take you all the way to the "def bar():" line in file3.py. ------------------------------------------------------------------------------ 5.4. `g:jedi#documentation_command` *g:jedi#documentation_command* From 1388f461378575344ec097e27cf68e7d12051634 Mon Sep 17 00:00:00 2001 From: Chris Lasher Date: Wed, 13 Nov 2013 14:06:38 -0800 Subject: [PATCH 7/8] Fixes goto_definitions_command documentation. --- doc/jedi-vim.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/jedi-vim.txt b/doc/jedi-vim.txt index 08daf04..4641943 100644 --- a/doc/jedi-vim.txt +++ b/doc/jedi-vim.txt @@ -225,7 +225,7 @@ the cursor. Just like the `jedi#goto_assignments()` function, it does not work if the definition isn't in a Python source file. The difference between `jedi#goto_assignments()` and `jedi#goto_definitions()` -is that the former doesn't perform recursive lookups. Take, for example, the +is that the latter performs recursive lookups. Take, for example, the following module structure: > # file1.py: @@ -238,9 +238,16 @@ following module structure: > def bar(): pass -The `jedi#goto_assignments()` function will take you to the "from file2 import -foo" statement in file1.py, while the `jedi#goto_definitions()` function will -take you all the way to the "def bar():" line in file3.py. +The `jedi#goto_assignments()` function will take you to the > + + from file2 import foo + +statement in file1.py, while the `jedi#goto_definitions()` function will take +you all the way to the > + + def bar(): + +line in file3.py. ------------------------------------------------------------------------------ 5.4. `g:jedi#documentation_command` *g:jedi#documentation_command* From 51802fa1510aaec245b3448bdb9236c2478f9a68 Mon Sep 17 00:00:00 2001 From: Chris Lasher Date: Sat, 21 Dec 2013 12:14:44 -0800 Subject: [PATCH 8/8] Update AUTHORS.txt Adds Chris Lasher to list of contributors. --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index 26f41e4..0873a5e 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -37,6 +37,7 @@ Yann Thomas-Gérard (@inside) Colin Su (@littleq0903) Justin M. Keyes (@justinmk) nagev (@np1) +Chris Lasher (@gotgenes) @something are github user names.