Skip to content

Commit c33b135

Browse files
committed
Add g:pymode_rope_autocomplete_map option.
1 parent 8d6abaf commit c33b135

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ Default values: ::
203203
" Load rope plugin
204204
let g:pymode_rope = 1
205205

206+
" Map keys for autocompletion
207+
let g:pymode_rope_autocomplete_map = '<C-Space>'
208+
206209
" Auto create and open ropeproject
207210
let g:pymode_rope_auto_project = 1
208211

doc/pymode.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ To redefine keys, see: |PythonModeOptions|
539539
================ ============================
540540
Key Command
541541
================ ============================
542-
K Show python docs for current word under cursor
543-
C-Space Rope code assist
544-
<leader>r Run current buffer
545-
<leader>b Set breakpoints
542+
K Show python docs for current word under cursor (`g:pymode_doc_key`)
543+
C-Space Rope code assist (`g:pymode_rope_autocomplete_map`)
544+
<leader>r Run current buffer (`g:pymode_run_key`)
545+
<leader>b Set breakpoints (`g:pymode_breakpoint_key`)
546546
[[ Jump to previous class or function (normal, visual, operator modes)
547547
]] Jump to next class or function (normal, visual, operator modes)
548548
[M Jump to previous class or method (normal, visual, operator modes)

ftplugin/python/init-pymode.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ endif
189189

190190
if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
191191

192+
" OPTION: g:pymode_rope_autocomplete_key -- str. Key for the rope
193+
" autocompletion.
194+
call pymode#Default("g:pymode_rope_autocomplete_map", "<c-space>")
195+
192196
" OPTION: g:pymode_rope_auto_project -- bool. Auto create ropeproject
193197
call pymode#Default("g:pymode_rope_auto_project", 1)
194198

ftplugin/python/pymode.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ if pymode#Option('rope')
9696
9797
if g:pymode_rope_map_space
9898
let s:prascm = g:pymode_rope_always_show_complete_menu ? "<C-P>" : ""
99-
exe "inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
100-
exe "inoremap <silent> <buffer> <c-space> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
99+
" exe "inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
100+
exe "inoremap <silent> <buffer> " . g:pymode_rope_autocomplete_map . " <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
101101
endif
102102

103103
endif

0 commit comments

Comments
 (0)