From 3c6584fb30f1df0f0b562133f34979992558e97e Mon Sep 17 00:00:00 2001 From: Ludvig Ericson Date: Thu, 25 Aug 2016 11:40:35 +0200 Subject: [PATCH] Add bell option --- README.mdown | 5 +++++ autoload/flake8.vim | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.mdown b/README.mdown index 940eadf..6f4b59e 100644 --- a/README.mdown +++ b/README.mdown @@ -60,6 +60,11 @@ To customize whether the quickfix window opens, set `g:flake8_show_quickfix`: let g:flake8_show_quickfix=0 " don't show let g:flake8_show_quickfix=1 " show (default) +To customize whether a warning bell is sounded on errors, set `g:flake8_bell`: + + let g:flake8_bell=0 " no bell + let g:flake8_bell=1 " bell (default) + To customize whether the show signs in the gutter, set `g:flake8_show_in_gutter`: let g:flake8_show_in_gutter=0 " don't show (default) diff --git a/autoload/flake8.vim b/autoload/flake8.vim index 06a1b6b..01a6a36 100644 --- a/autoload/flake8.vim +++ b/autoload/flake8.vim @@ -75,6 +75,7 @@ function! s:Setup() " {{{ call s:DeclareOption('flake8_quickfix_location', '', '"belowright"') call s:DeclareOption('flake8_quickfix_height', '', 5) call s:DeclareOption('flake8_show_quickfix', '', 1) + call s:DeclareOption('flake8_bell', '', 1) " markers to show call s:DeclareOption('flake8_show_in_gutter', '', 0) call s:DeclareOption('flake8_show_in_file', '', 0) @@ -161,6 +162,10 @@ function! s:Flake8() " {{{ nnoremap c :cclose nnoremap q :cclose endif + " bell + if !s:flake8_bell == 0 + normal "\" + endif endif set nolazyredraw