Skip to content

Commit 9db9857

Browse files
committed
Update autopep8
1 parent 06eb9e6 commit 9db9857

File tree

5 files changed

+286
-134
lines changed

5 files changed

+286
-134
lines changed

Changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Changelog
66
* Dont raise an exception when Logger has no message handler (c) nixon
77
* Improve performance of white space removal (c) Dave Smith
88
* Improve ropemode support (c) s0undt3ch
9+
* Add `g:pymode_updatetime` option
10+
* Update autopep8 to version 0.8.1
911

1012
## 2012-09-07 0.6.9
1113
-------------------

autoload/pymode.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,11 @@ fun! pymode#Modeline() "{{{
180180
endfunction "}}}
181181

182182

183+
fun! pymode#TrimWhiteSpace() "{{{
184+
let cursor_pos = getpos('.')
185+
silent! %s/\s\+$//
186+
call setpos('.', cursor_pos)
187+
endfunction "}}}
188+
189+
183190
" vim: fdm=marker:fdl=0

ftplugin/python/pymode.vim

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,7 @@ endif
133133
" Utils {{{
134134

135135
if pymode#Option('utils_whitespaces')
136-
function PyModeTrimEndWhiteSpace()
137-
let cursor_pos = getpos('.')
138-
:silent! %s/\s\+$//
139-
call setpos('.', cursor_pos)
140-
endfunction
141-
au BufWritePre <buffer> call PyModeTrimEndWhiteSpace()
136+
au BufWritePre <buffer> call pymode#TrimWhiteSpace()
142137
endif
143138

144139
" }}}

0 commit comments

Comments
 (0)