8000 Update autogroup · python-mode/python-mode@902cb3d · GitHub
[go: up one dir, main page]

Skip to content

Commit 902cb3d

Browse files
committed
Update autogroup
1 parent 23c2797 commit 902cb3d

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Contributors:
1111
* Ashley Hewson (ashleyh);
1212
* Benjamin Ruston (bruston);
1313
* Boris Filippov (frenzykryger);
14+
* Daniel Hahler (blueyed)
1415
* David Vogt (winged);
1516
* Denis Kasak (dkasak);
1617
* Dirk Wallenstein (dirkwallenstein);

ftplugin/python/pymode.vim

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ if !pymode#default('g:pymode_init', 1)
99
call pymode#breakpoint#init()
1010
endif
1111

12+
augroup pymode
13+
14+
au!
15+
1216
command! -buffer -nargs=1 PymodeVirtualenv call pymode#virtualenv#activate(<args>)
1317

1418
" 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()
1721

1822
" Run python code
1923
if g:pymode_run
@@ -43,7 +47,7 @@ endif
4347

4448
" Remove unused whitespaces
4549
if g:pymode_trim_whitespaces
46-
au pymode BufWritePre <buffer> call pymode#trim_whitespaces()
50+
au BufWritePre <buffer> call pymode#trim_whitespaces()
4751
endif
4852

4953
" Custom options
@@ -70,19 +74,19 @@ if g:pymode_lint
7074
let b:pymode_signs = []
7175

7276
if g:pymode_lint_on_fly
73-
au pymode InsertLeave <buffer> PymodeLint
77+
au! InsertLeave <buffer> PymodeLint
7478
endif
7579

7680
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()
7983
endif
8084

8185
" Disabled for current release
8286
if g:pymode_lint_async
8387
" 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()
8690
end
8791

8892
endif
@@ -183,3 +187,5 @@ if g:pymode_rope
183187
end
184188

185189
end
190+
191+
augroup END

0 commit comments

Comments
 (0)
0