4

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 :onlyin the other window or so, but how can I clear the side marks?

David Cain
  • 16,484
  • 14
  • 65
  • 75
Antonis Christofides
  • 6,990
  • 2
  • 39
  • 57

2 Answers2

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
  • 1
    If 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