Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX-Terminal.app + vim + solarized colorscheme

Tags:

vim

macos

I know this topic is widely spread over the internet, but I have spent the whole morning searching a solution and nothing helps.

I want to use vim in the osx-terminal with the solarized colorscheme.

So i downloaded the solarized.vim file an copied it into /usr/share/vim/colors and wrote

   let g:solarized_termcolors=256
   set background=dark
   colorscheme solarized 

in the .vimrc.

In the preferences, the terminal is set to xterm-256color, but the color is still messed up.

What i did, is exactly what you can find here.

So, what am i doing wrong?

like image 277
hoa Avatar asked Jul 24 '15 08:07

hoa


2 Answers

If you're trying to use VIM on the console, try changing the Terminal theme to Solarized.

You can follow this blog post on Solarized theme for OSX:

In the Terminal.app you have a few options of color schemes that you can choose from. We are going to install the Solarized Dark and Solarized Light themes for some human eye friendly color combinations

  1. Go to http://ethanschoonover.com/solarized in your browser
  2. Download the the latest version http://ethanschoonover.com/solarized/files/solarized.zip.
  3. Unzip the package and locate the osx-terminal.app-colors-solarized folder within the extracted folder.
  4. Double click on Solarized Dark ansi.terminal and Solarized Light ansi.terminal.

If your system then complains that it is from an unidentified developer, you have to temporarily allow applications from anywhere. To do this go to: System Preferences > Security & Privacy > General > Allow applications downloaded from and select “Anywhere”. Don’t forget to change this back!

  1. Select the theme in the Terminal.app preferences under Settings > Profiles. You can press default to have it default selected.
like image 116
raviolicode Avatar answered Oct 22 '22 00:10

raviolicode


https://vi.stackexchange.com/a/3707/1145

http://ethanschoonover.com/solarized/vim-colors-solarized

IMPORTANT NOTE FOR TERMINAL USERS:

If you are going to use Solarized in Terminal mode (i.e. not in a GUI version like gvim or macvim), please please please consider setting your terminal emulator’s colorscheme to use the Solarized palette. I’ve included palettes for some popular terminal emulator as well as Xdefaults in the official Solarized download available from Solarized homepage. If you use Solarized without these colors, Solarized will need to be told to degrade its colorscheme to a set compatible with the limited 256 terminal palette (whereas by using the terminal’s 16 ansi color values, you can set the correct, specific values for the Solarized palette).

If you do use the custom terminal colors, solarized.vim should work out of the box for you. If you are using a terminal emulator that supports 256 colors and don’t want to use the custom Solarized terminal colors, you will need to use the degraded 256 colorscheme. To do so, simply add the following line before the colorschem solarized line:

let g:solarized_termcolors=256

Again, I recommend just changing your terminal colors to Solarized values either manually or via one of the many terminal schemes available for import.

like image 36
Alex Kroll Avatar answered Oct 21 '22 22:10

Alex Kroll