Skip to content

Commit ed513e8

Browse files
committed
Minor fix
1 parent 79d9ade commit ed513e8

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

Changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Changelog
22
=========
33

4+
* Add 'g:pymode_rope_always_show_complete_menu' option
5+
46
## 2011-10-25 0.3.0
57
-------------------
68
* Add g:pymode_lint_minheight and g:pymode_lint_maxheight

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ Default values: ::
147147

148148
let g:pymode_rope_goto_def_newwin = 0
149149

150+
let g:pymode_rope_always_show_complete_menu = 0
151+
150152
Other stuff
151153
-----------
152154

after/plugin/pymode_rope.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,25 @@ call helpers#SafeVar("g:pymode_rope_guess_project", 1)
4949
" OPTION: g:pymode_rope_goto_def_newwin -- bool.
5050
call helpers#SafeVar("g:pymode_rope_goto_def_newwin", 0)
5151

52+
" OPTION: g:pymode_rope_always_show_complete_menu -- bool.
53+
call helpers#SafeVar("g:pymode_rope_always_show_complete_menu", 0)
54+
5255
" DESC: Init Rope
5356
py import ropevim
5457

58+
5559
fun! RopeCodeAssistInsertMode() "{{{
5660
call RopeCodeAssist()
5761
return ""
5862
endfunction "}}}
5963

64+
6065
fun! RopeLuckyAssistInsertMode() "{{{
6166
call RopeLuckyAssist()
6267
return ""
6368
endfunction "}}}
6469

70+
6571
fun! RopeOmni(findstart, base) "{{{
6672
" TODO: Fix omni
6773
if a:findstart == 1
@@ -73,6 +79,7 @@ fun! RopeOmni(findstart, base) "{{{
7379
endif
7480
endfunction "}}}
7581

82+
7683
" Rope menu
7784
menu <silent> Rope.Autoimport :RopeAutoImport<CR>
7885
menu <silent> Rope.ChangeSignature :RopeChangeSignature<CR>

doc/ropevim.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ restructuring can be: >
253253
found is located in another file. By default the
254254
file is open in the same buffer.
255255

256+
*'pymode_rope_always_show_complete_menu'* If set, rope autocompletion menu
257+
always show.
258+
256259

257260
==============================================================================
258261
9. Keybinding ~

ftplugin/python/pymode.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ if g:pymode_rope
6969
noremap <silent> <buffer> <C-c>d :RopeShowDoc<CR>
7070
noremap <silent> <buffer> <C-c>f :RopeFindOccurrences<CR>
7171
noremap <silent> <buffer> <C-c>m :emenu Rope.<TAB>
72-
inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>
73-
inoremap <silent> <buffer> <C-space> <C-R>=RopeCodeAssistInsertMode()<CR>
7472
inoremap <silent> <buffer> <S-TAB> <C-R>=RopeLuckyAssistInsertMode()<CR>
7573
74+
let s:prascm = g:pymode_rope_always_show_complete_menu ? "<C-P>" : ""
75+
exe "inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
76+
exe "inoremap <silent> <buffer> <C-space> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
77+
7678
endif
7779

7880
" Run code

0 commit comments

Comments
 (0)