Skip to content

Commit 742d8f5

Browse files
committed
Add PyLintToggleWindow
1 parent 843223a commit 742d8f5

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

Changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
## 2011-11-27 0.4.7
5+
-------------------
6+
* Add `PyLintWindowToggle` command
7+
* Fix some bugs
8+
49
## 2011-11-23 0.4.6
510
-------------------
611
* Enable all syntax highlighting

autoload/pymode/lint.vim

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,26 @@ endfunction
2121
fun! pymode#lint#Toggle() "{{{
2222
let g:pymode_lint = g:pymode_lint ? 0 : 1
2323
if g:pymode_lint
24-
echomsg "PyLint enabled."
24+
echomsg "Pymode lint enabled."
25+
botright cwindow
2526
else
26-
echomsg "PyLint disabled."
27+
echomsg "Pymode lint disabled."
28+
cclose
29+
endif
30+
endfunction "}}}
31+
32+
fun! pymode#lint#ToggleWindow() "{{{
33+
let g:pymode_lint_cwindow = g:pymode_lint_cwindow ? 0 : 1
34+
if g:pymode_lint_cwindow
35+
echomsg "Pymode lint cwindow enabled."
36+
botright cwindow
37+
else
38+
echomsg "Pymode lint cwindow disabled."
39+
cclose
2740
endif
2841
endfunction "}}}
2942

3043
fun! pymode#lint#ToggleChecker() "{{{
3144
let g:pymode_lint_checker = g:pymode_lint_checker == "pylint" ? "pyflakes" : "pylint"
32-
echomsg "PyLint checker: " . g:pymode_lint_checker
45+
echomsg "Pymode lint checker: " . g:pymode_lint_checker
3346
endfunction "}}}

ftplugin/python/pymode.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ if g:pymode_lint
6565

6666
" DESC: Set commands
6767
command! -buffer -nargs=0 PyLintToggle :call pymode#lint#Toggle()
68+
command! -buffer -nargs=0 PyLintWindowToggle :call pymode#lint#ToggleWindow()
6869
command! -buffer -nargs=0 PyLintCheckerToggle :call pymode#lint#ToggleChecker()
6970
command! -buffer -nargs=0 PyLint :call pymode#lint#Check()
7071

plugin/pymode.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
let g:pymode_version = "0.4.6"
1+
let g:pymode_version = "0.4.7"
22

3-
command! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
3+
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
44

55
" OPTION: g:pymode -- bool. Run pymode.
66
if pymode#Default('g:pymode', 1) || !g:pymode

0 commit comments

Comments
 (0)