Reputation: 19235
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.
Upvotes: 2
Views: 4283
Reputation: 2555
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.
Upvotes: 4