Syntax error in code breaks vim
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UltiSnips |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Sometimes when I edit python code and press Esc having invalid syntax (e.g. I've written 'if someCondition:' and pressed esc — next line doesn't have an appropriate indent), ultisnips error window apprears:
Following is the full stack trace:
Traceback (most recent call last):
File "/home/
return f(self, *args, **kwds)
File "/home/
if _vim.eval("mode()") not in 'in':
File "/home/
rv = vim.eval(
error: invalid expression
After that vim command line ignores all <cr> keystrokes (I can't type :w<cr> or even ZZ anymore) and my status line text turns into 'Pl#statusline', I have to C-z from vim and kill it.
Output of :py import sys; print sys.version:
2.7.5+ (default, Sep 19 2013, 13:52:09)
[GCC 4.8.1]
Unfortunately, there's no guaranteed way to reproduce the bug, sometimes it appears, sometimes not, so I can't give a strict way to reproduce it nor detect if any of my plugins affects the ultisnips behaviour.
Plugins I have:
Shougo/
Shougo/vimproc
Shougo/unite.vim
Shougo/
tsukkee/
ujihisa/
ujihisa/
thinca/
osyo-
osyo-
osyo-
tacroe/unite-mark
joedicastro/
zhaocai/
mattn/webapi-vim
vim-scripts/
kana/
Shougo/
tpope/
scrooloose/
SirVer/ultisnips
https:/
klen/python-mode
Yggdroot/
alfredodeza/
davidhalter/
Rykka/colorv.vim
mhinz/vim-signify
mhinz/
Shougo/vimfiler
tpope/
tpope/
tpope/vim-git
torkve/
junkblocker/
joedicastro/
joedicastro/
tpope/vim-ragtag
tyru/
vim-scripts/
http://
http://
http://
doxygen-toolkit
Lokaltog/
terryma/
That is a weird error. According to the stack trace, the code vim.eval("mode()") crashes as an invalid expression. Or the reencoding does not work properly. I have two hunches what could be the root cause for this:
1) you are working in some non-latin based language and are hitting some corner case with the vim string encoding facilities. Could that be it?
2) some other plugin interferes with UltiSnips. Could you try to reproduce the error on a minimal install (i.e. only UltiSnips and no other plugins)?