Closed yufangfred closed 9 years ago
I think that you need a version of vim compiled with the support of python. Can you provide the output of vim --version | grep python
?
Here is an example of the output for my vim:
vim --version | grep python
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
If you don't have +python
in the output, it means that you don't have a good version of vim. The solution depends of you environnement.
Mine has " +python/dyn" --- is that equivalent?
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn -python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs
I am using mac. I checked brew install macvim
it says macvim-7.4-74 already installed
which I believe is the latest version.
Problem solved. Thanks a lot.
Instead of building vim myself, I switched to the prebuilt snapshot.
Also, probably good to know, I find out you can check "+python" support by :echo has("python")
@Khady
We are already checking that, that's why merlin was able to print "Error: Required vim compiled with +python".
We should probably extend the fix with || has("python/dyn")
I guess
@CrazyBookSeller do you still have a vim with python/dyn? If so, could you check if this patch makes it work:
diff --git a/vim/merlin/autoload/merlin.vim b/vim/merlin/autoload/merlin.vim
index a173653..d353bde 100644
--- a/vim/merlin/autoload/merlin.vim
+++ b/vim/merlin/autoload/merlin.vim
@@ -1,6 +1,6 @@
if !exists('g:merlin') | let g:merlin = {} | endif | let s:c = g:merlin
-if !has('python')
+if !has('python') && !has('python/dyn')
echo "Error: Required vim compiled with +python"
finish
endif
Sure, how do I suppose to add the patch? @def-lkb
Just edit the "autoload/merlin.vim" file, you can find its path by running :scriptnames
in vim.
I tested on a local build with +python/dyn:
has("python") == 1
has("python/dyn") == 0
I guess in your case, has("python") == 0
because python couldn't be dynamically loaded.
Don't bother patching.
i have ocaml 4.01.0
I followed the steps in "With opam"
and put this in vimrc
But merlin seems not working because when I save a .ml file with
:w
error message like this shows up in vim.Please help