MacOS Solarized Color-scheme在终端VIM中无效

时间:2018-06-08 20:02:59

标签: vim terminal color-scheme

我按照Ethan的指南进行配置曝光。特别是我:

  • 下载并为OS X终端设置他的Solarized Dark ansi配置文件
  • 下载并将曝光的主题移动到vim / colors
  • 然后我将两行set background=darkcolorscheme solarized添加到我的vimrc
  • 还下载了macvim并将vim链接到macvims vim

这样做后,我得到一个带绿线的丑陋的vim,颜色不太对劲。我尝试使用256色版本并添加选项let g:solarized_termcolors=256,虽然它看起来好一点,但它不是很正确,我宁愿用日本化的终端主题+ ansi颜色做本机方式。

Ugly Solarized Result

macOS Terminal Profile Set

这是我的vimrc:

set nocompatible              " be iMproved, required
filetype off                  " required

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

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" javascript syntax highlighting
Plugin 'jelera/vim-javascript-syntax'

" indentation help
Plugin 'pangloss/vim-javascript'
Plugin 'nathanaelkane/vim-indent-guides'

" bracket and quote help
Plugin 'Raimondi/delimitMate'

" YouCompleteMe
Plugin 'Valloric/YouCompleteMe'

" Tern
Plugin 'marijnh/tern_for_vim'

" Surround.vim
Plugin 'tpope/vim-surround'

" Fuzzy file search
Plugin 'kien/ctrlp.vim'

call vundle#end()            " required
filetype plugin indent on    " required

" map ctrl + c to automatically delimit brackets and quotes
imap <C-c> <CR><Esc>O

" fuck ex mode
nnoremap Q <nop>

" you complete me tweaks
let g:ycm_add_preview_to_completeopt=0
let g:ycm_confirm_extra_conf=0
set completeopt-=preview

" general options
syntax on
set number
set expandtab
set tabstop=2
set shiftwidth=2
set guifont=Menlo:h12
set background=dark
colorscheme solarized
set showbreak=↪

let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1

1 个答案:

答案 0 :(得分:1)

  1. Solarized在终端模拟器中看起来不是“正确”,因为它的调色板中没有一种颜色与the standard xterm palette的任何颜色16-255相匹配。与官方模糊可能让你想到的相反,Solarized调色板非常不适合终端使用并且Vim colorscheme根本不是很好写,所以不要太过于梦幻般的蓝色背景

  2. 也就是说,有两种假设的方法可以使Solarized在终端中看起来“正确”:

    • 设置终端仿真器的颜色0-15,并确保Solarized和Vim仅使用这些颜色,
    • 或者,如果你的终端模拟器和你的Vim构建允许它,使用:help 'termguicolors'强制Vim使用“真彩色”。提示:Terminal.app不支持该功能。
  3. 您的Solarized终端调色板坏了:这些是默认颜色,而不是Solarized颜色。

  4. 不要在废话上浪费你的时间。您可以随意使用大量精彩的书写颜色。

相关问题