@@ -38,6 +38,9 @@ call pymode#default('g:pymode_syntax_string_format', g:pymode_syntax_all)
3838call pymode#default (' g:pymode_syntax_string_templates' , g: pymode_syntax_all )
3939call pymode#default (' g:pymode_syntax_doctests' , g: pymode_syntax_all )
4040
41+ " Support docstrings in syntax highlighting
42+ call pymode#default (' g:pymode_syntax_docstrings' , 1 )
43+
4144" Highlight builtin objects (True, False, ...)
4245call pymode#default (' g:pymode_syntax_builtin_objs' , g: pymode_syntax_all )
4346
@@ -225,7 +228,7 @@ endif
225228 endif
226229
227230 " DocStrings
228- if ! pymode#Default ( ' g:pymode_syntax_docstrings ' , g: pymode_syntax_all ) || g: pymode_syntax_docstrings
231+ if g: pymode_syntax_docstrings
229232 syn region pythonDocstring start =+ ^\s *[uU]\? [rR]\? """+ end =+ """+ keepend excludenl contains =pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError
230233 syn region pythonDocstring start =+ ^\s *[uU]\? [rR]\? '''+ end =+ '''+ keepend excludenl contains =pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError
231234 endif
@@ -352,6 +355,7 @@ endif
352355 hi def link pythonSpaceError Error
353356
354357 hi def link pythonString String
358+ hi def link pythonDocstring String
355359 hi def link pythonUniString String
356360 hi def link pythonRawString String
357361 hi def link pythonUniRawString String
0 commit comments