Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ae1df9

Browse files
committed
Auto-open existing projects.
When Vim loads, if, on the current directory, there's a `.ropeproject` sub-directory and both rope and `g:pymode_rope_auto_project_open` are enabled, the project is automatically opened.
1 parent681a182 commit5ae1df9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎plugin/pymode.vim

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,14 @@ endif
175175

176176
if!pymode#Default("g:pymode_rope",1)||g:pymode_rope
177177

178-
" OPTION: g:pymode_rope_auto_project -- bool. Autoopen ropeproject
178+
" OPTION: g:pymode_rope_auto_project -- bool. Autocreate ropeproject
179179
callpymode#Default("g:pymode_rope_auto_project",1)
180180

181+
" OPTION: g:pymode_rope_auto_project_open -- bool.
182+
" Auto open existing projects, ie, if the current directory has a
183+
" `.ropeproject` subdirectory.
184+
callpymode#Default("g:pymode_rope_auto_project_open",1)
185+
181186
" OPTION: g:pymode_rope_enable_autoimport -- bool. Enable autoimport
182187
callpymode#Default("g:pymode_rope_enable_autoimport",1)
183188

@@ -234,6 +239,13 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
234239
return""
235240
endfunction"}}}
236241

242+
fun!RopeOpenExistingProject()"{{{
243+
ifisdirectory('./.ropeproject')
244+
callRopeOpenProject()
245+
return""
246+
endif
247+
endfunction"}}}
248+
237249
fun!RopeLuckyAssistInsertMode()"{{{
238250
callRopeLuckyAssist()
239251
return""
@@ -270,6 +282,12 @@ if !pymode#Default("g:pymode_rope", 1) || g:pymode_rope
270282
menu<silent> Rope.Undo :RopeUndo<CR>
271283
menu<silent> Rope.UseFunction :RopeUseFunction<CR>
272284

285+
" Hooks
286+
if!pymode#Default("g:pymode_rope_auto_project_open",1)||g:pymode_rope_auto_project_open
287+
autocmdVimEnter*callRopeOpenExistingProject()
288+
callwindoe
289+
endif
290+
273291
endif
274292

275293
" }}}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp