@@ -99,6 +99,10 @@ if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint
99
99
" OPTION: g:pymode_lint_mccabe_complexity -- int. Maximum allowed complexity
100
100
call pymode#Default (" g:pymode_lint_mccabe_complexity" ,8 )
101
101
102
+ " OPTION: g:pymode_lint_signs_always_visible -- bool. Always show the
103
+ " errors ruller, even if there's no errors.
104
+ call pymode#Default (" g:pymode_lint_signs_always_visible" ,0 )
105
+
102
106
" OPTION: g:pymode_lint_signs -- bool. Place error signs
103
107
if (! pymode#Default (" g:pymode_lint_signs" ,1 )|| g: pymode_lint_signs )&& has (' signs' )
104
108
@@ -109,6 +113,12 @@ if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint
109
113
sign define E text= EE texthl= Error
110
114
sign define I text= II texthl= Info
111
115
116
+ if ! pymode#Default (" g:pymode_lint_signs_always_visible" ,0 )|| g: pymode_lint_signs_always_visible
117
+ " Show the sign's ruller if asked for, even it there's no error to show
118
+ sign define __dummy__
119
+ autocmd BufRead ,BufNew * call RopeShowSignsRulerIfNeeded ()
120
+ endif
121
+
112
122
endif
113
123
114
124
" DESC: Set default pylint configuration
@@ -175,9 +185,17 @@ endif
175
185
176
186
if ! pymode#Default (" g:pymode_rope" ,1 )|| g: pymode_rope
177
187
178
- " OPTION: g:pymode_rope_auto_project -- bool. Autoopen ropeproject
188
+ " OPTION: g:pymode_rope_auto_project -- bool. Autocreate ropeproject
179
189
call pymode#Default (" g:pymode_rope_auto_project" ,1 )
180
190
191
+ " OPTION: g:pymode_rope_auto_project_open -- bool.
192
+ " Auto open existing projects, ie, if the current directory has a
193
+ " `.ropeproject` subdirectory.
194
+ call pymode#Default (" g:pymode_rope_auto_project_open" ,1 )
195
+
196
+ " OPTION: g:pymode_rope_auto_session_manage -- bool
197
+ call pymode#Default (" g:pymode_rope_auto_session_manage" ,0 )
198
+
181
199
" OPTION: g:pymode_rope_enable_autoimport -- bool. Enable autoimport
182
200
call pymode#Default (" g:pymode_rope_enable_autoimport" ,1 )
183
201
@@ -234,6 +252,15 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
234
252
return " "
235
253
endfunction " }}}
236
254
255
+ fun ! RopeOpenExistingProject ()" {{{
256
+ if isdirectory (getcwd () .' /.ropeproject' )
257
+ " In order to pass it the quiet kwarg I need to open the project
258
+ " using python and not vim, which should be no major issue
259
+ py ropevim._interface.open_project (quiet= True)
260
+ return " "
261
+ endif
262
+ endfunction " }}}
263
+
237
264
fun ! RopeLuckyAssistInsertMode ()" {{{
238
265
call RopeLuckyAssist ()
239
266
return " "
@@ -249,6 +276,13 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
249
276
endif
250
277
endfunction " }}}
251
278
279
+ fun ! RopeShowSignsRulerIfNeeded ()" {{{
280
+ if &ft == ' python'
281
+ execute printf (' silent! sign place 1 line=1 name=__dummy__ file=%s' ,expand (" %:p" ))
282
+ endif
283
+ endfunction " }}}
284
+
285
+
252
286
" Rope menu
253
287
menu <silent> Rope.Autoimport :RopeAutoImport<CR>
254
288
menu <silent> Rope.ChangeSignature :RopeChangeSignature<CR>
@@ -270,6 +304,15 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
270
304
menu <silent> Rope.Undo :RopeUndo<CR>
271
305
menu <silent> Rope.UseFunction :RopeUseFunction<CR>
272
306
307
+ if ! pymode#Default (" g:pymode_rope_auto_project_open" ,1 )|| g: pymode_rope_auto_project_open
308
+ call RopeOpenExistingProject ()
309
+ endif
310
+
311
+ if ! pymode#Default (" g:pymode_rope_auto_session_manage" ,0 )|| g: pymode_rope_auto_session_manage
312
+ autocmd VimLeave * call RopeSaveSession ()
313
+ autocmd VimEnter * call RopeRestoreSession ()
314
+ endif
315
+
273
316
endif
274
317
275
318
" }}}
@@ -290,4 +333,7 @@ call pymode#Default("g:pymode_utils_whitespaces", 1)
290
333
" OPTION: g:pymode_options -- bool. To set some python options.
291
334
call pymode#Default (" g:pymode_options" ,1 )
292
335
336
+ " OPTION: g:pymode_updatetime -- int. Set updatetime for async pymode's operation
337
+ call pymode#Default (" g:pymode_updatetime" ,1000 )
338
+
293
339
" vim:fdm = marker:fdl = 0