vim-python / python-syntax

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

Do not recognize %[hlL] as printf style formats #22

Open anntzer opened 7 years ago

anntzer commented 7 years ago

Currently "%h" (and l, L) are recognized as printf style formats (https://github.com/vim-python/python-syntax/blob/master/syntax/python.vim#L238). While they are technically legal, they are also useless in Python and likely very rarely used (https://docs.python.org/3.6/library/stdtypes.html#printf-style-string-formatting "A length modifier (h, l, or L) may be present, but is ignored as it is not necessary for Python – so e.g. %ld is identical to %d.").

I would thus suggest turning them off (to decrease the number of "false" highlightings where the % is, well, just a percent sign), or at least make that configurable.