Skip to content

Commit 3f2fd87

Browse files
committed
Force lint every save
1 parent 0d36f06 commit 3f2fd87

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

autoload/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fun! pymode#buffer_post_write() "{{{
112112
if b:pymode_modified && g:pymode_rope_regenerate_on_write
113113
call pymode#rope#regenerate()
114114
endif
115-
if b:pymode_modified && g:pymode_lint_on_write
115+
if g:pymode_lint_on_write && (b:pymode_modified || g:pymode_lint_unmodified)
116116
call pymode#lint#check()
117117
endif
118118
endfunction "}}}

doc/pymode.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ Check code on every save (if file has been modified) *'g:pymode_lint_on_write'*
276276
>
277277
let g:pymode_lint_on_write = 1
278278
279+
Check code on every save (every) *'g:pymode_lint_unmodified'*
280+
>
281+
let g:pymode_lint_unmodified = 1
282+
279283
Check code when editting (onfly) *'g:pymode_lint_on_fly'*
280284
>
281285
let g:pymode_lint_on_fly = 1

plugin/pymode.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ call pymode#default('g:pymode_lint', 1)
8383
call pymode#default('g:pymode_lint_async', 1)
8484
call pymode#default('g:pymode_lint_async_updatetime', 1000)
8585

86-
" Check code every save.
86+
" Check code every save if file has been modified
8787
call pymode#default("g:pymode_lint_on_write", 1)
8888

89+
" Check code every save (every)
90+
call pymode#default("g:pymode_lint_unmodified", 0)
91+
8992
" Check code on fly
9093
call pymode#default("g:pymode_lint_on_fly", 0)
9194

0 commit comments

Comments
 (0)