Closed tankorsmash closed 8 years ago
Can you run vim -V9vimlog
in any directory, invoke Ctrl-P (getting a result of 0), then :qa
and look for a Vim or Python error near the bottom of the vimlog
file?
Seems like s:regexes
isn't defined, but I'm not quite sure. Oh, my vim is only compiled with -python +python3
, this is probably a requirement for +python
. I'll see if I can get cpsm going for python3 maybe.
Since Ubuntu 16 doesn't ship with Python2.7 by default anymore, it seems like its going to be harder and harder to get a version of vim compiled with Python2.7 support.
Thanks for the verbose vim log tip.
fchdir() to previous dir
line 14: sourcing "/home/username/.vim/bundle/cpsm/autoload/cpsm.vim"
Error detected while processing /home/username/.vim/bundle/cpsm/autoload/cpsm.vim:
line 41:
E319: Sorry, the command is not available in this version: pyfile /home/username/.vim/bundle/cpsm/autoload/cpsm.py
finished sourcing /home/username/.vim/bundle/cpsm/autoload/cpsm.vim
continuing in function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems[14]..cpsm#CtrlPMatch:
line 6:
E319: Sorry, the command is not available in this version: py ctrlp_match()
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems[14]..cpsm#CtrlPMatch:
line 10:
E121: Undefined variable: s:regexes
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems[14]..cpsm#CtrlPMatch:
line 10:
E15: Invalid expression: s:regexes
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems[14]..cpsm#CtrlPMatch:
line 15:
E121: Undefined variable: s:results
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[11]..<SNR>64_MatchedItems[14]..cpsm#CtrlPMatch:
line 15:
E15: Invalid expression: s:results
Error detected while processing function ctrlp#init[17]..<SNR>64_BuildPrompt[6]..<SNR>64_Update[14]..<SNR>64_Render:
line 11:
E706: Variable type mismatch for: lines>>> _
Executing CursorMoved Auto commands for "*"
autocommand call s:Highlight_Matching_Pair()
E319: Sorry, the command is not available in this version: pyfile /home/username/.vim/bundle/cpsm/autoload/cpsm.py
Aha, it seems your Vim binary was built without Python support. I wonder if this is due to a switch to Python 3. Can you try :echo has('python')
and :echo has('python3')
in Vim? I've pushed a small change that should at least detect this condition.
As for Python 3 support... I haven't tried it, so I don't know what won't work (at a minimum, I'm not sure what string types Vim will use). And CMake apparently doesn't play very well with it. So it might be a while.
No worries, that was it then! Thanks for your help, I'll close this off.
My understanding of Python3 in terms of backwards compat stuff is you can just replace the strings with the byte prefix, so that they're treated like Python2s string instead of unicode.
If you're looking to get vim with python2 support instead of python3, you'll need vim-python
. I use gVim, so the command was sudo apt-get install vim-gnome-py2
.
Thanks again!
I'm running Ubuntu 16.04beta, so the libs I used to compile are fairly experimental. No matter what I search for with ctrlp, and cpsm set as the matcher, the result is always 0.
The only ctrlp setting I have enabled is the setting the match_func, and if I remove it, ctrlp works as normal.
If it's relevant, here's the output of install.sh