I am using Vim 8.1 on Debian 11 Bullseye, but it does not work in the recent Vim 8.2 either.
I would like to syntax highlight a Python formatted string, which looks currently in vim so:
but should look like this:
(compare the curly braces and their content)
Does anyone know of a plugin that does this "properly", or can provide the syntax I need to insert in /usr/share/vim/vim81/syntax/python.vim to achieve this highlighting?
There is an appropriate highlighter on github: https://github.com/vim-python/python-syntax
In .vimrc, you need to enable either everything with
let g:python_highlight_all = 1
or specifics, like I did:
let g:python_highlight_string_format = 1
let g:python_highlight_builtin_objs = 1
A python formatted string now looks like:
(with my color definitions)