I've configured python-mode to check manually. So I type :PyLint
and it checks my code, showing the "QuickFix" window and some marks at the side. I can subsequently close the QuickFix window by typing :only
in the other window or so, but how can I clear the side marks?
Asked
Active
Viewed 829 times
4

David Cain
- 16,484
- 14
- 65
- 75

Antonis Christofides
- 6,990
- 2
- 39
- 57
-
Correcting all the errors, then re-running `:PyLint` will do the trick, but I'm not sure how well this solves your problem. – David Cain Aug 01 '13 at 14:54
-
No, or course not. The problem is that I can't correct all the errors in a huge and messy file. I rewrite parts of it and I use `PyLint` to check that these parts are OK. But then when I do other work elsewhere in the file, I need to turn these off; they are too distracting. – Antonis Christofides Aug 01 '13 at 14:59
-
Does a `:sign unplace *` do what you want? – FDinoff Aug 01 '13 at 15:05
-
@FDinoff: Yes, that was what I wanted (maybe you want to create an answer with that). – Antonis Christofides Aug 01 '13 at 15:25
-
1@AntonisChristofides Just take Ingo's Answer. – FDinoff Aug 01 '13 at 15:40
2 Answers
5
The plugin uses signs to show the lint errors. If you never want to see them
let g:pymode_lint_signs = 0
disables them.
If you want to clear them, AFAICT there's no interface in the plugin for just that. (You could file an enhancement request.) But what should work is clearing all signs of the current buffer:
:sign unplace * buffer=<C-r>=bufnr('')<CR>
or
:execute 'sign unplace * buffer=' . bufnr('')

Ingo Karkat
- 167,457
- 16
- 250
- 324
-
I can't take this answer as it is now because it's too complicated, vim complains that the commands are wrong, and `:sign unplace *` is what I want. – Antonis Christofides Aug 01 '13 at 16:06
-
1If this is too complex to type, you have several options: custom command, cabbrev, mapping, ... A simple `:sign unplace *` does more than what you want; it affects **all signs in all buffers**. But go ahead and use just that if you can live with the consequences. – Ingo Karkat Aug 01 '13 at 16:25
-
(I meant it's too complicated given that `:sign unplace *` does the job, but you made it clear that it has a problem.) Vim still complains these commands are wrong. While `:sign unplace 1 buffer=1` works, `:sign unplace * buffer=1` says "E474: Invalid argument". – Antonis Christofides Aug 01 '13 at 20:28
-
Oh, you need at least Vim 7.3.596 for that to work. Update your Vim, or use the worse alternative. – Ingo Karkat Aug 02 '13 at 06:14
2
PyLint marks are made with signs. (:h :sign
)
You can use
:sign unplace *
to remove all the signs in all buffers. This will only be a problem if you want some buffers to keep signs.
If you only want to remove signs in only the current buffer you can use a mapping of Ingo Karkat's answer.
nnoremap <leader>s :execute 'sign unplace * buffer=' . bufnr('')<CR>
Take a look at :h :sign-unplace
for other options.

FDinoff
- 30,689
- 5
- 75
- 96