@@ -3,15 +3,19 @@ if pymode#Default('b:pymode', 1)
33endif
44
55" Syntax highlight
6- if ! pymode#Default ( ' g:pymode_syntax ' , 1 ) || g: pymode_syntax
6+ if pymode#Option ( ' syntax ' )
77 let python_highlight_all= 1
88endif
99
1010
11+ " Parse pymode modeline
12+ call pymode#Modeline ()
13+
14+
1115" Options {{{
1216
1317" Python indent options
14- if ! pymode#Default ( ' g:pymode_options_indent ' , 1 ) || g: pymode_options_indent
18+ if pymode#Option ( ' options_indent ' )
1519 setlocal cinwords = if ,elif,else ,for ,while ,try ,except,finally ,def ,class
1620 setlocal cindent
1721 setlocal tabstop = 4
@@ -25,7 +29,7 @@ if !pymode#Default('g:pymode_options_indent', 1) || g:pymode_options_indent
2529endif
2630
2731" Python other options
28- if ! pymode#Default ( ' g:pymode_options_other ' , 1 ) || g: pymode_options_other
32+ if pymode#Option ( ' options_other ' )
2933 setlocal complete += t
3034 setlocal formatoptions -= t
3135 if v: version > 702 && ! &relativenumber
4044
4145" Documentation {{{
4246
43- if g: pymode_doc
47+ if pymode#Option ( ' doc ' )
4448
4549 " DESC: Set commands
4650 command ! - buffer -nargs =1 Pydoc call pymode#doc#Show (" <args>" )
5660
5761" Lint {{{
5862
59- if g: pymode_lint
63+ if pymode#Option ( ' lint ' )
6064
6165 let b: qf_list = []
6266
@@ -67,15 +71,15 @@ if g:pymode_lint
6771 command ! - buffer -nargs =0 PyLint :call pymode#lint#Check ()
6872
6973 " DESC: Set autocommands
70- if g: pymode_lint_write
74+ if pymode#Option ( ' lint_write ' )
7175 au BufWritePost <buffer> PyLint
7276 endif
7377
74- if g: pymode_lint_onfly
78+ if pymode#Option ( ' lint_onfly ' )
7579 au InsertLeave <buffer> PyLint
7680 endif
7781
78- if g: pymode_lint_message
82+ if pymode#Option ( ' lint_message ' )
7983
8084 " DESC: Show message flag
8185 let b: show_message = 0
9599
96100" Rope {{{
97101
98- if g: pymode_rope
102+ if pymode#Option ( ' rope ' )
99103
100104 " DESC: Set keys
101105 exe " noremap <silent> <buffer> " . g: pymode_rope_short_prefix . " g :RopeGotoDefinition<CR>"
@@ -115,7 +119,7 @@ endif
115119
116120" Execution {{{
117121
118- if g: pymode_run
122+ if pymode#Option ( ' run ' )
119123
120124 " DESC: Set commands
121125 command ! - buffer -nargs =0 -range =% Pyrun call pymode#run#Run (<f-line1> , <f-line2> )
@@ -131,7 +135,7 @@ endif
131135
132136" Breakpoints {{{
133137
134- if g: pymode_breakpoint
138+ if pymode#Option ( ' breakpoint ' )
135139
136140 " DESC: Set keys
137141 exe " nnoremap <silent> <buffer> " g: pymode_breakpoint_key " :call pymode#breakpoint#Set(line('.'))<CR>"
@@ -143,7 +147,7 @@ endif
143147
144148" Utils {{{
145149
146- if g: pymode_utils_whitespaces
150+ if pymode#Option ( ' utils_whitespaces ' )
147151 au BufWritePre <buffer> :call setline (1 ,map (getline (1 ," $" ),' substitute(v:val,"\\s\\+$","","")' ))
148152endif
149153
@@ -152,7 +156,7 @@ endif
152156
153157" Folding {{{
154158
155- if g: pymode_folding
159+ if pymode#Option ( ' folding ' )
156160
157161 setlocal foldmethod = expr
158162 setlocal foldexpr = pymode#folding#expr (v: lnum )
@@ -162,5 +166,4 @@ endif
162166
163167" }}}
164168
165-
166169" vim: fdm = marker:fdl = 0
0 commit comments