From 3b54f6b5f55ddd551365c34f7b8314f453ba7562 Mon Sep 17 00:00:00 2001 From: Anton Parkhomenko Date: Thu, 7 Nov 2013 03:38:38 +0800 Subject: [PATCH] Docstring syntax --- syntax/python.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/syntax/python.vim b/syntax/python.vim index e570b632..0bfec832 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -177,6 +177,13 @@ call pymode#Default('g:pymode_syntax_all', 1) syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained endif + " DocStrings + if !pymode#Default('g:pymode_syntax_docstrings', g:pymode_syntax_all) || g:pymode_syntax_docstrings + syn region pythonDocstring start=+^\s*[uU]\?[rR]\?"""+ end=+"""+ keepend excludenl contains=pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError + syn region pythonDocstring start=+^\s*[uU]\?[rR]\?'''+ end=+'''+ keepend excludenl contains=pythonEscape,@Spell,pythonDoctest,pythonDocTest2,pythonSpaceError + endif + + " }}} " Numbers {{{