&encoding
thrown by the plugin's Python code, so I hope this post will help others avoid my problems.Make sure that
- Python 2.6.x or better is installed for Cygwin,
- vim is compiled with the
+python
or+python3
configuration flag (as appropriate), and - vim is compiled with the
+multi_byte
config flag.
You can check vim's configuration flags by running this command in a Cygwin shell:
$ vim --version | grep -E '(python|multi)'You should see something like
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent Linking: gcc -L. -L/usr/local/lib -o vim.exe -lm -lncurses -L/usr/lib/python2.7/config -lpython2.7 -lruby191 -lrt
The + signs on the
+python
and +multi_byte
flags indicates Vim was compiled with Python and multibyte support. The UltiSnips Vim plugin wraps a Python application to do the heavy lifting. It will fail if Python is not available.
In addition, if vim is not configured for multibyte code, then the Python code will fail on an empty Vim variable
&encoding
. See line 18 in this example:Happy vimming!