Skip to content

Commit e7678bc

Browse files
committed
Move space key mapping to var
1 parent a2b752f commit e7678bc

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ftplugin/python/pymode.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ if pymode#Option('rope')
105105
exe "noremap <silent> <buffer> " . g:pymode_rope_short_prefix . "m :emenu Rope . <TAB>"
106106
inoremap <silent> <buffer> <S-TAB> <C-R>=RopeLuckyAssistInsertMode()<CR>
107107
108-
let s:prascm = g:pymode_rope_always_show_complete_menu ? "<C-P>" : ""
109-
exe "inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
110-
exe "inoremap <silent> <buffer> <C-space> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
108+
if g:pymode_rope_map_space
109+
let s:prascm = g:pymode_rope_always_show_complete_menu ? "<C-P>" : ""
110+
exe "inoremap <silent> <buffer> <Nul> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
111+
exe "inoremap <silent> <buffer> <c-space> <C-R>=RopeCodeAssistInsertMode()<CR>" . s:prascm
112+
endif
111113

112114
endif
113115

plugin/pymode.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
211211
" OPTION: g:pymode_rope_short_prefix -- string.
212212
call pymode#Default("g:pymode_rope_short_prefix", "<C-c>")
213213

214+
" OPTION: g:pymode_rope_map_space -- string.
215+
call pymode#Default("g:pymode_rope_map_space", 1)
216+
214217
" OPTION: g:pymode_rope_vim_completion -- bool.
215218
call pymode#Default("g:pymode_rope_vim_completion", 1)
216219

0 commit comments

Comments
 (0)