Permalink
Browse files

Add an option to turn off the custom syntax highlighting.

  • Loading branch information...
1 parent d0e8322 commit 67033ee4b9ee6d4916752da5e360b65ddf2fb525 @sjl committed Nov 10, 2011
Showing with 20 additions and 3 deletions.
  1. +3 −0 README.rst
  2. +10 −0 doc/pymode.txt
  3. +5 −3 ftplugin/python/pymode.vim
  4. +2 −0 syntax/python.vim
View
@@ -222,6 +222,9 @@ Default values: ::
" Set default pymode python other options
let g:pymode_options_other = 1
+ " Enable pymode's custom syntax highlighting
+ let g:pymode_syntax = 1
+
Default keys
============
View
@@ -75,6 +75,8 @@ PythonMode. These options should be set in your vimrc.
|'pymode_utils_whitespaces'| Remove unused whitespaces
+|'pymode_syntax'| Turns off the custom syntax highlighting
+
|'pymode_options_indent'| Set default pymode options for
python indentation
@@ -234,6 +236,14 @@ Default: 1.
Autoremove unused whitespaces
------------------------------------------------------------------------------
+ *'pymode_syntax'*
+Values: 0 or 1.
+Default: 1.
+
+If this option is set to 0 then the custom syntax highlighting will
+not be used.
+
+------------------------------------------------------------------------------
*'pymode_options_indent'*
Values: 0 or 1.
Default: 1.
@@ -3,9 +3,11 @@ if pymode#Default('b:pymode', 1)
endif
" Syntax highlight
-let python_highlight_all=1
-let python_highlight_exceptions=1
-let python_highlight_builtins=1
+if !pymode#Default('g:pymode_syntax', 1) || g:pymode_syntax
+ let python_highlight_all=1
+ let python_highlight_exceptions=1
+ let python_highlight_builtins=1
+endif
" Python indent options
if !pymode#Default('g:pymode_options_indent', 1) || g:pymode_options_indent
View
@@ -77,6 +77,8 @@ if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
+elseif exists("g:pymode_syntax") && g:pymode_syntax == 0
+ finish
endif
if exists("python_highlight_all") && python_highlight_all != 0

0 comments on commit 67033ee

Please sign in to comment.