vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
438 stars 84 forks source link

python-syntax doesn't load after default vim syntax file #73

Closed weavage closed 3 years ago

weavage commented 3 years ago

There seems to be a bug in the logic that detects previous syntax files here. On my Ubuntu machine with Vim 8, the default vim syntax file gets loaded first: /usr/share/vim/vim80/syntax/python.vim This sets the '''b:current_syntax''' variable meaning the ptyhon-syntax script exits early due to the above lines. This results in several problems like missing highlights (#26 ) and commands missing (#61 ). Is this something specific to my setup or an actual bug?

Congee commented 3 years ago

Yeah, the default one defines syntax keyword pythonTodo contained NOTE NOTES FIXME XXX TODO, while python-syntax highlights only FIXME XXX TODO

nfnty commented 3 years ago

This syntax plugin needs to be loaded before any others, otherwise it will just return without doing anything. Just like the builtin syntax files do.

@Congee That has nothing to do with op's problem. If you want to define more keywords, you can do so easily in your personal config. Or if there's some keyword you feel that everyone could benefit from you can open a PR.