diff --git a/doc/pymode.txt b/doc/pymode.txt index 65f3e9a4..3f807cac 100644 --- a/doc/pymode.txt +++ b/doc/pymode.txt @@ -663,6 +663,10 @@ Enable all python highlights *'g:pymode_syntax_all' > let g:pymode_syntax_all = 1 +Highlight "exit" as a function *'g:pymode_syntax_exit_as_function'* +> + let g:pymode_syntax_exit_as_function = 0 + Highlight "print" as a function *'g:pymode_syntax_print_as_function'* > let g:pymode_syntax_print_as_function = 0 diff --git a/submodules/astroid b/submodules/astroid index 36dda3fc..5e1a1b75 160000 --- a/submodules/astroid +++ b/submodules/astroid @@ -1 +1 @@ -Subproject commit 36dda3fc8a5826b19a33a0ff29402b61d6a64fc2 +Subproject commit 5e1a1b756482225bf293f5f4c3dfa3e508a50a89 diff --git a/submodules/autopep8 b/submodules/autopep8 index 32c78a3a..74da7aeb 160000 --- a/submodules/autopep8 +++ b/submodules/autopep8 @@ -1 +1 @@ -Subproject commit 32c78a3a07d7ee35500e6f20bfcd621f3132c42e +Subproject commit 74da7aebad2e0253cf4508bf54f51626b70cd978 diff --git a/submodules/mccabe b/submodules/mccabe index 2d4dd943..835a5400 160000 --- a/submodules/mccabe +++ b/submodules/mccabe @@ -1 +1 @@ -Subproject commit 2d4dd9435fcb05aaa89ba0392a84cb1d30a87dc9 +Subproject commit 835a5400881b7460998be51d871fd36f836db3c9 diff --git a/submodules/pycodestyle b/submodules/pycodestyle index 930e2cad..a7938390 160000 --- a/submodules/pycodestyle +++ b/submodules/pycodestyle @@ -1 +1 @@ -Subproject commit 930e2cad15df3661306740c30a892a6f1902ef1d +Subproject commit a7938390f6eb1a3e2880f512223af03b844a7de7 diff --git a/submodules/pydocstyle b/submodules/pydocstyle index 5f59f6eb..a6fe4222 160000 --- a/submodules/pydocstyle +++ b/submodules/pydocstyle @@ -1 +1 @@ -Subproject commit 5f59f6eba0d8f0168c6ab45ee97485569b861b77 +Subproject commit a6fe4222012e990042c86cdaaa904a8d059752ee diff --git a/submodules/pyflakes b/submodules/pyflakes index 95fe313b..2409df01 160000 --- a/submodules/pyflakes +++ b/submodules/pyflakes @@ -1 +1 @@ -Subproject commit 95fe313ba5ca384041472cd171ea60fad910c207 +Subproject commit 2409df015d9d847890716b242cb418047cd9d6b7 diff --git a/submodules/pylama b/submodules/pylama index f436ccc6..10e55b1a 160000 --- a/submodules/pylama +++ b/submodules/pylama @@ -1 +1 @@ -Subproject commit f436ccc6b55b33381a295ded753e467953cf4379 +Subproject commit 10e55b1a3572456bf197ca6bf1b9207473411cc4 diff --git a/submodules/pylint b/submodules/pylint index 3eb0362d..4cc1d8d1 160000 --- a/submodules/pylint +++ b/submodules/pylint @@ -1 +1 @@ -Subproject commit 3eb0362dc42642e3e2774d7523a1e73d71394064 +Subproject commit 4cc1d8d14cb34f30ede8b917ddb4483185cd5a2f diff --git a/submodules/rope b/submodules/rope index 62af070a..6a86c2f2 160000 --- a/submodules/rope +++ b/submodules/rope @@ -1 +1 @@ -Subproject commit 62af070aa5ed3505a2629a76778003ce7fd383f0 +Subproject commit 6a86c2f2dd86040d132ef8088e038afeaec3a5c3 diff --git a/submodules/toml b/submodules/toml index 3f637dba..59d83d0d 160000 --- a/submodules/toml +++ b/submodules/toml @@ -1 +1 @@ -Subproject commit 3f637dba5f68db63d4b30967fedda51c82459471 +Subproject commit 59d83d0d51a976f11a74991fa7d220fc630d8bae diff --git a/syntax/python.vim b/syntax/python.vim index 5a76d2b0..6e811e75 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -14,6 +14,9 @@ endif " Highlight all by default call pymode#default('g:pymode_syntax_all', 1) +" Highlight 'exit' as function +call pymode#default("g:pymode_syntax_exit_as_function", 0) + " Highlight 'print' as function call pymode#default("g:pymode_syntax_print_as_function", 0) " @@ -102,6 +105,10 @@ endif syn match pythonExtraOperator "\%([~!^&|/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\.\.\.\|\.\.\|::\)" syn match pythonExtraPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)" + if !g:pymode_syntax_exit_as_function + syn keyword pythonStatement exit + endif + if !g:pymode_syntax_print_as_function syn keyword pythonStatement print endif @@ -294,6 +301,10 @@ endif syn keyword pythonBuiltinFunc repr reversed round setattr syn keyword pythonBuiltinFunc slice sorted staticmethod sum vars zip + if g:pymode_syntax_exit_as_function + syn keyword pythonBuiltinFunc exit + endif + if g:pymode_syntax_print_as_function syn keyword pythonBuiltinFunc print endif