@@ -99,6 +99,10 @@ if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint
9999 " OPTION: g:pymode_lint_mccabe_complexity -- int. Maximum allowed complexity
100100 call pymode#Default (" g:pymode_lint_mccabe_complexity" , 8 )
101101
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+
102106 " OPTION: g:pymode_lint_signs -- bool. Place error signs
103107 if (! pymode#Default (" g:pymode_lint_signs" , 1 ) || g: pymode_lint_signs ) && has (' signs' )
104108
@@ -109,6 +113,12 @@ if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint
109113 sign define E text= EE texthl= Error
110114 sign define I text= II texthl= Info
111115
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+
112122 endif
113123
114124 " DESC: Set default pylint configuration
@@ -175,9 +185,17 @@ endif
175185
176186if ! pymode#Default (" g:pymode_rope" , 1 ) || g: pymode_rope
177187
178- " OPTION: g:pymode_rope_auto_project -- bool. Auto open ropeproject
188+ " OPTION: g:pymode_rope_auto_project -- bool. Auto create ropeproject
179189 call pymode#Default (" g:pymode_rope_auto_project" , 1 )
180190
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+
181199 " OPTION: g:pymode_rope_enable_autoimport -- bool. Enable autoimport
182200 call pymode#Default (" g:pymode_rope_enable_autoimport" , 1 )
183201
@@ -234,6 +252,15 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
234252 return " "
235253 endfunction " }}}
236254
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+
237264 fun ! RopeLuckyAssistInsertMode () " {{{
238265 call RopeLuckyAssist ()
239266 return " "
@@ -249,6 +276,13 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
249276 endif
250277 endfunction " }}}
251278
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+
252286 " Rope menu
253287 menu <silent> Rope.Autoimport :RopeAutoImport<CR>
254288 menu <silent> Rope.ChangeSignature :RopeChangeSignature<CR>
@@ -270,6 +304,15 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
270304 menu <silent> Rope.Undo :RopeUndo<CR>
271305 menu <silent> Rope.UseFunction :RopeUseFunction<CR>
272306
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+
273316endif
274317
275318" }}}
@@ -290,4 +333,7 @@ call pymode#Default("g:pymode_utils_whitespaces", 1)
290333" OPTION: g:pymode_options -- bool. To set some python options.
291334call pymode#Default (" g:pymode_options" , 1 )
292335
336+ " OPTION: g:pymode_updatetime -- int. Set updatetime for async pymode's operation
337+ call pymode#Default (" g:pymode_updatetime" , 1000 )
338+
293339" vim: fdm = marker:fdl = 0
0 commit comments