Disable smart_auto_mappings by default

Ref: https://github.com/davidhalter/jedi-vim/issues/568
This commit is contained in:
Daniel Hahler
2019-03-28 13:34:26 +01:00
committed by Dave Halter
parent f26b2a8802
commit 914754a04e
3 changed files with 33 additions and 14 deletions

View File

@@ -27,15 +27,9 @@ describe 'completions'
set completeopt-=longest
end
it 'smart import'
it 'no smart import by default'
exec "normal ifrom os "
Expect getline('.') == 'from os import '
end
it 'no smart import after space'
exec "normal! ifrom os "
exec "normal a "
Expect getline('.') == 'from os '
Expect getline('.') == 'from os '
end
it 'import'
@@ -109,4 +103,29 @@ describe 'completions'
end
end
describe 'smart completions'
before
new
let g:jedi#smart_auto_mappings = 1
set filetype=python
end
after
" default
let g:jedi#smart_auto_mappings = 0
bd!
end
it 'smart import'
exec "normal ifrom os "
Expect getline('.') == 'from os import '
end
it 'no smart import after space'
exec "normal! ifrom os "
exec "normal a "
Expect getline('.') == 'from os '
end
end
" vim: et:ts=4:sw=4