1

I am experiencing a behavior as depicted in the picture below: vim marks the redundant spacing in red.

Marking of redundant spacing in red

I would like to completely remove this behavior. At the moment my .vimrc file reads as:


set nocompatible              " required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')



" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'dense-analysis/ale'
Plugin 'sheerun/vim-polyglot'
Plugin 'tmsvg/pear-tree'
Plugin 'godlygeek/tabular'
Plugin 'preservim/nerdtree'
Plugin 'arcticicestudio/nord-vim'
Plugin 'morhetz/gruvbox'
" All of your Plugins must be added before the following line"
call vundle#end()            " required
filetype plugin indent on    " required

"Automaticaly open nerdTREE"
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
nmap <F1> :NERDTreeToggle<CR>

"Python settings"
au BufNewFile, BufRead *.py
    \ set tabstop=4
    \ set softtabstop=4
    \ set shiftwidth=4
    \ set textwidth=79
    \ set expandtab
    \ set autoindent
    \ set fileformat=unix
    \ set encoding=utf-8

colorscheme gruvbox
set background=dark
let g:gruvbox_contrast_dark = 'soft'
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>    

At some point I had this part of code which I think precisely initialized such behavior:

au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/

But since then I have purged vim from my computer with all other info as well, reinstalled it but the problem still is here.

3
  • 1
    Could it be from ALE? Or a colorscheme?
    – D. Ben Knoble
    Commented Feb 17, 2020 at 23:57
  • 1
    Welcome to this site! For me your question is a duplicate of this one, please read it and you will probably find what is causing this behavior. If you don't you can edit your question and let us know what you tried to solve your problem.
    – statox
    Commented Feb 18, 2020 at 9:25
  • 1
    First, I'd double check that your old highlighting item is definitely gone: :verbose hi BadWhitespace. Then, presuming that returns no results, I'd find out whether it's a match by running :call clearmatches() or if it's a syntax item by placing my cursor on the highlighted area and running: :echo synIDattr(synID(line("."), col("."), 1), "name")
    – Rich
    Commented Feb 18, 2020 at 9:42

1 Answer 1

1

I believe this is caused by an option in the python highlighting used by your vim-polyglot plugin. You can disable this by setting the following variable in your vimrc:

let g:python_highlight_space_errors = 0
1
  • Good find Rich. I suspected a plugin
    – D. Ben Knoble
    Commented Feb 18, 2020 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.