2

I'd like to disable the pylint plugin for a single file in vim. I don't want to permanently disable pylint for the file, which is what adding a comment blocking pylint would do.

The problem is that every time I save with :w, there is a ~5 second lag before I am able to edit the file again. As far as I can tell, pylint is causing this lag.

Community
  • 1
  • 1
keflavich
  • 18,278
  • 20
  • 86
  • 118

1 Answers1

4

I use the vim plugin python-mode

Reading :help pymode, under section 4. Commands:

:PyLintToggle                                                   
    Enable, disable pylint

:PyLint                                                        
    Check current buffer

In your .vimrc file, you can add:

let g:pymode_lint_write = 0       "turn off running pylint on file save
let mapleader = ","
nnoremap <leader>p :PyLint<cr>    "pressing ,p will run plyint on current buffer

Afterwhich, pressing ,p in normal mode will run pylint on the current buffer, and autosaving any .py file will not trigger a pylint check unless :PyLintToggle is run.

Neil
  • 24,551
  • 15
  • 60
  • 81
mtadd
  • 2,495
  • 15
  • 18