macos - Color issue with mac terminal
天蓬老师
天蓬老师 2017-05-16 16:39:49
0
9
655

Configuring the color of the terminal and the vim of the terminal are so uncomfortable because of the color. Anyone who has used the solarizde theme should know what it looks like, but after I finished configuring it, it looked like:

I searched a lot of answers on the Internet but nothing worked. What about xterm-256? Set t_Co=256. I have used many of them, but it just doesn’t work. I have used them all, including the 256 color configuration item that sets solarized. This one works. Are you a good person who knows? Please help me!

:ver

:set term?

Display term=xterm-256color

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(9)
迷茫

I solved it myself, I set the terminal color manually

伊谢尔伦

Eh? Shouldn’t everyone on Mac have installed oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh

洪涛

Visually, it doesn’t have much to do with vimrc.

Try adding it in bashrc or zshrc

# Set Solarized color
export CLICOLOR=1
export LSCOLORS=exfxcxdxbxegedabagacad
某草草

You can try iterm-2.
A terminal under Mac can completely replace the original terminal and is very powerful.
Then recommend this article to you.
The Mac development configuration manual has instructions for configuring colors.

过去多啦不再A梦

vim still needs to be configured. In addition to colorscheme solarized, I have also added the following configuration:

vimset background=dark
let g:solarized_termcolors=256
let g:solarized_termtrans=1

In addition, I looked through the terminal configuration and saw it
export TERM=xterm-256color

I’ll show you the screenshot, it’s not perfect:
vim:

Terminal:

Reference link:
Solarized colors in vim don't seem to be working for me

習慣沉默

I think mine is okay

淡淡烟草味

For the terminal, use: iTerm + oh-my-zsh, and use Railscasts theme for Vim. The effect is as follows.

伊谢尔伦

I am looking for a solution. I have the same problem. After working on it for a long time, I added:
set t_Co=256
:let g:solarized_termcolors=256
But the final look is just like this:

洪涛

sublime party flying high in the sky

If you commonly use vim and it’s a mac, shouldn’t you install macvim?,,

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!