From f08abefa311db0256b722e92668cbf5e5f5f3d4e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 18 Mar 2016 23:16:07 +0100 Subject: [PATCH] jedi#smart_auto_mappings: use `\m` with `search()` for `magic` With `nomagic` being set (not recommended, but might happen), the pattern would not work. This patch sets `\m` explicitly. --- autoload/jedi.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 49e9d0a..1432dae 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -503,7 +503,7 @@ endfunction function! jedi#smart_auto_mappings() " Auto put import statement after from module.name and complete - if search('^\s*from\s\+[A-Za-z0-9._]\{1,50}\%#\s*$', 'bcn', line('.')) + if search('\m^\s*from\s\+[A-Za-z0-9._]\{1,50}\%#\s*$', 'bcn', line('.')) " Enter character and start completion. return "\import \\\=jedi#complete_opened(1)\" endif