@@ -9,11 +9,15 @@ if !pymode#default('g:pymode_init', 1)
9
9
call pymode#breakpoint#init ()
10
10
endif
11
11
12
+ augroup pymode
13
+
14
+ au !
15
+
12
16
command ! - buffer -nargs =1 PymodeVirtualenv call pymode#virtualenv#activate (<args> )
13
17
14
18
" Setup events for pymode
15
- au pymode BufWritePre <buffer> call pymode#buffer_pre_write ()
16
- au pymode BufWritePost <buffer> call pymode#buffer_post_write ()
19
+ au BufWritePre <buffer> call pymode#buffer_pre_write ()
20
+ au BufWritePost <buffer> call pymode#buffer_post_write ()
17
21
18
22
" Run python code
19
23
if g: pymode_run
43
47
44
48
" Remove unused whitespaces
45
49
if g: pymode_trim_whitespaces
46
- au pymode BufWritePre <buffer> call pymode#trim_whitespaces ()
50
+ au BufWritePre <buffer> call pymode#trim_whitespaces ()
47
51
endif
48
52
49
53
" Custom options
@@ -70,19 +74,19 @@ if g:pymode_lint
70
74
let b: pymode_signs = []
71
75
72
76
if g: pymode_lint_on_fly
73
- au pymode InsertLeave <buffer> PymodeLint
77
+ au ! InsertLeave <buffer> PymodeLint
74
78
endif
75
79
76
80
if g: pymode_lint_message
77
- au ! pymode CursorMoved <buffer>
78
- au ! pymode CursorMoved <buffer> call pymode#lint#show_errormessage ()
81
+ au ! CursorMoved <buffer>
82
+ au ! CursorMoved <buffer> call pymode#lint#show_errormessage ()
79
83
endif
80
84
81
85
" Disabled for current release
82
86
if g: pymode_lint_async
83
87
" let &l:updatetime = g:pymode_lint_async_updatetime
84
- " au! pymode BufEnter <buffer> call pymode#lint#start()
85
- " au! pymode BufLeave <buffer> call pymode#lint#stop()
88
+ " au! BufEnter <buffer> call pymode#lint#start()
89
+ " au! BufLeave <buffer> call pymode#lint#stop()
86
90
end
87
91
88
92
endif
@@ -183,3 +187,5 @@ if g:pymode_rope
183
187
end
184
188
185
189
end
190
+
191
+ augroup END
0 commit comments