当Vim/Neovim突出显示与文本相同的颜色时无法读取
我一直在尝试将我的vim/neovim游戏提升到下一个级别,并且我一直试图做的一件事是修复突出显示的问题一直有。其要点在于,有时候,语法,视觉选择和搜索突出显示使用与原始文本相同/相似的突出显示颜色,使得难以看到突出显示的内容。有谁知道我怎么能解决这个问题?基于第一个截图,它看起来像它完全有能力这样做,我似乎无法找到一个配置选项,使其一致。当Vim/Neovim突出显示与文本相同的颜色时无法读取
以下是一些例子(我是在这些使用neovim同时,该行为是相同的W/VIM):
笔记怎么有些文本几乎是不可能的阅读,同时强调? (在突出显示之前它是白色的)以红色/蓝色突出显示的地点更多地是我预计突出显示将始终工作(突出显示颜色或多或少与原始文本颜色相匹配,但突出显示时,文本颜色已更改使选择可读)。
突出显示所有出现的“if”。再次,请注意文本和突出显示如何几乎不可区分。
请注意语法突出显示(在这种情况下是[]对)如何隐藏2个周围的字符。这也发生在(,),{和}上。
的.vimrc(init.vim基本相同):
syntax enable
:color peachpuff
set nocp
set wildmenu
set relativenumber
set number
set ignorecase
set smartcase
set incsearch
set nowrap
set tabstop=4
set softtabstop=4
set expandtab
set shiftwidth=4
set showcmd
set clipboard=unnamed
set laststatus=2
set clipboard+=unnamedplus
set directory=~/.vim/tmp
"sudo after opening:
cmap w!! w !sudo tee >/dev/null %
"formatting brackets and such:
inoremap {<Tab> {}<Esc>i
inoremap {<CR> {<CR>}<Esc>ko<Tab>
inoremap (<Tab>()<Esc>i
inoremap (<CR> (<CR>)<Esc>ko<Tab>
inoremap [<Tab> []<Esc>i
inoremap [<CR> [<CR>]<Esc>ko<Tab>
只是尝试不同的色彩方案。这个插件有负荷: https://github.com/flazz/vim-colorschemes
我建议gruvbox
,twilight
或apprentice
,但也有很多伟大的人的,找到一个适合您。
您可以安装这个插件,能够快速切换到下一个色彩方案: https://github.com/xolox/vim-colorscheme-switcher
编辑:这里是你可能已经默认情况下,在你的vim安装colorschemes的列表: https://github.com/vim/vim/tree/master/runtime/colors
如果你想尝试一些没有安装任何插件或任何东西,只要做例如:colorscheme evening
,看看它们的外观。如果输入:colorscheme <CTRL-D>
,则会显示哪些颜色配方可用。
谢谢!自从我发布这个以来,我实际上一直在玩这个扩展。我只是无法找到我喜欢的计划。我喜欢我拥有的终端颜色,并希望保留它们。 – Drake
好的,如果你不想切换颜色方案,你可以随时编辑你的当前颜色。尝试并找到peachpuff.vim文件并使用它。在任何修改之后,你可以重新启动vim,或者直接使用':source path/to/peachpuff.vim'来试试你的修改 – nickspoon
我实际上只是对我的评论输入一个编辑。我其实喜欢徒弟!但我也可以尝试调整现有的颜色格式。 我仍然不能帮助,但认为它不应该突出显示文本颜色,或者应该有一个选项。似乎有点马虎,你知道吗? – Drake