Highlight python docstrings as comments (vim syntax highlighting)

后端 未结 3 961
梦毁少年i
梦毁少年i 2020-12-15 07:01

Is it possible to modify python.vim (and the corresponding colorscheme file) such that triple-quoted strings right under class and def statements (a.k.a. docstrings) will be

3条回答
  •  情深已故
    2020-12-15 08:02

    you can add the following line:

    syn region Comment start=/"""/ end=/"""/
    

    to your ~/.vim/after/syntax/python.vim. You can create this file if it doesn't exists.

提交回复
热议问题