Skip to content

Commit ade0967

Browse files
committed
Track &magic
1 parent 8318c16 commit ade0967

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

after/ftplugin/python.vim

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ endif
44

55
if g:pymode_motion
66

7+
if !&magic
8+
if g:pymode_warning
9+
call pymode#error("Pymode motion requires `&magic` option. Enable them or disable g:pymode_motion")
10+
endif
11+
finish
12+
endif
13+
714
nnoremap <buffer> ]] :<C-U>call pymode#motion#move('^\(class\\|def\)\s', '')<CR>
815
nnoremap <buffer> [[ :<C-U>call pymode#motion#move('^\(class\\|def\)\s', 'b')<CR>
916
nnoremap <buffer> ]C :<C-U>call pymode#motion#move('^\(class\\|def\)\s', '')<CR>
@@ -41,9 +48,11 @@ if g:pymode_rope && g:pymode_rope_completion
4148

4249
setlocal omnifunc=pymode#rope#completions
4350

44-
exe "inoremap <silent> <buffer> " . g:pymode_rope_completion_bind . " <C-R>=pymode#rope#complete(0)<CR>"
45-
if tolower(g:pymode_rope_completion_bind) == '<c-space>'
46-
exe "inoremap <silent> <buffer> <Nul> <C-R>=pymode#rope#complete(0)<CR>"
47-
endif
51+
if g:pymode_rope_completion_bind != ""
52+
exe "inoremap <silent> <buffer> " . g:pymode_rope_completion_bind . " <C-R>=pymode#rope#complete(0)<CR>"
53+
if tolower(g:pymode_rope_completion_bind) == '<c-space>'
54+
exe "inoremap <silent> <buffer> <Nul> <C-R>=pymode#rope#complete(0)<CR>"
55+
endif
56+
end
4857

4958
end

doc/pymode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ Open any python file and run ":call pymode#troubleshooting#Test()",
596596
fix the warning or send me the output.
597597

598598

599-
Rope completion is very slow
599+
Rope completion is very slow *pymode-rope-slow*
600600
----------------------------
601601

602602
Rope creates a project-level service directory in |.ropeproject|

0 commit comments

Comments
 (0)