如何在 vim 中去除选项卡高亮显示

3

你好,我正在尝试个性化vim编辑器,但遇到了这个问题:每个空格都被突出显示。我已经尝试过使用:noh:nohlsearch等方法来解决,但都没有奏效。enter image description here

下面是我的.vimrc文件:

:nohlsearch 
syntax on
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set nu
set nowrap
set smartcase
set noswapfile
set nobackup
set undofile
set incsearch
set colorcolumn=80
set backspace=indent,eol,start
highlight ColorColumn ctermbg=0 guibg=lightgrey
call plug#begin('~/.vim/plugged') 
" Neovim lsp Plugins
Plug 'rafi/awesome-vim-colorschemes'
Plug 'neovim/nvim-lspconfig'
Plug 'tweekmonster/gofmt.vim'
Plug 'tpope/vim-fugitive'
Plug 'vim-utils/vim-man'
Plug 'mbbill/undotree'
Plug 'sheerun/vim-polyglot'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'stsewd/fzf-checkout.vim'
Plug 'vuciv/vim-bujo'
Plug 'tpope/vim-dispatch'
Plug '/home/mpaulson/personal/vim-apm'
Plug 'theprimeagen/vim-be-good'
Plug 'gruvbox-community/gruvbox'
Plug 'colepeters/spacemacs-theme.vim'
Plug 'sainnhe/gruvbox-material'
Plug 'phanviet/vim-monokai-pro'
Plug 'flazz/vim-colorschemes'
Plug 'chriskempson/base16-vim'
call plug#end()


我现在无法打开这张图片。只是为了确认一下,更改colorschemefiletype会有所不同吗? - Light
当你执行/\t时,它是否匹配?我认为这是因为你有expandtab,但那些可能是实际的制表符。 - Jake Grossman
你的行里面混合了空格和制表符吗?试试使用 :set list 命令查看实际存在的字符...如果是空格和制表符的混合,则该警告是由 vim-polyglot 启用的。这种警告是正确的,因为在 Python 中混合使用空格和制表符是错误的。 - filbranden
1个回答

2
可能已启用listchars功能。 请尝试使用:set nolist禁用它。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接