Hello, all: When vim only compiled with python 3 support, and we write something in test.vim like:
python3 << EOF
print("Hello, world")
EOF
The highlight is not what we want. I think following line in
$VIMRUNTIME/syntax/vim.vim is wrong:
if (g:vimsyn_embed =~ 'P' && has("python")) && filereadable(s:pythonpath)
has("python") is false, although has("python3") is true. We should use
(has("python") || has("python3")) instead. Another solution is just
drop has("python"). I have wrote a patch for this which attached to
the letter.
Regards,
Mizuchi
diff -ru vim-7.3.661/runtime/syntax/vim.vim
vim-7.3.661-new/runtime/syntax/vim.vim
--- vim-7.3.661/runtime/syntax/vim.vim 2012-09-15 11:47:31.000000000 +0800
+++ vim-7.3.661-new/runtime/syntax/vim.vim 2012-10-16 04:11:30.114323907
+0800
@@ -629,7 +629,7 @@
if !filereadable(s:pythonpath)
let s:pythonpath= fnameescape(globpath(&rtp,"syntax/python.vim"))
endif
-if (g:vimsyn_embed =~ 'P' && has("python")) && filereadable(s:pythonpath)
+if (g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) &&
filereadable(s:pythonpath)
unlet! b:current_syntax
exe "syn include @vimPythonScript ".s:pythonpath
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'P'
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
fix.diff
Description: Binary data
