Macos Vim Color



Question or issue on macOS:

Mac Os Vim Color Schemes

  1. Mar 09, 2020 The default Vim color scheme in a light terminal is peachpuff. If you use a dark terminal, the initial color scheme is ron. To see a list of ready-to-use themes, open any document using the Vim editor and use the following instruction::colorscheme space Ctrl+d The output shows a list of Vim color schemes, which you can also see in the image.
  2. 将Solarized主题的vim文件拷贝到系统的vim目录 cd solarized cd vim-colors-solarized/colors mkdir -p /.vim/colors cp solarized.vim /.vim/colors/ 修改vim设置:vim /.vimrc,在该文件中添加一下内容 syntax on set background=dark # 背景为dark,也可选light colorscheme solarized.

I’m working with the Vim 7.2 that comes with Mac OS 10.6.1 (Leopard), using the Mac’s “Terminal” app. Download macos 10.15 catalina iso image. I’d like to use a fancy color scheme. I did this…

Macos vim color setting

Then this…

DinVim is a vim for Mac OS that supports syntax coloring out of the box.

Syntax highlighting is working, but I’m finding that regardless of the scheme I choose, the only colors displayed are the basic Red, Blue, Cyan, Gray, etc.

Is there a way to get the Terminal app to display a larger collection of colors to allow some more subtle schemes?

How to solve this problem?

Vim Color Scheme

Solution no. 1:

The Terminal.app supports AFAIK only 16 colors; iTerm supports more colors or you use mvim (as suggested by Daniel).

Solution no. 2:

Create vimrc file on your home folder and then edit it. Bootstrap studio download mac. You can try adding syntax on inside ~/.vimrc file.

It will highlight your code syntax on vim

Solution no. 3:

Add “syntax on” to the file /usr/share/vim/vimrc and you’ll get highlighting in your files every time you edit one.

Vim

# vi /usr/share/vim/vimrc Braille font download mac.

Add this line at the end of the file:

Now you’ll get highlighting when you edit whatever’s file.

Solution no. 4:

You need to create file ~/.vimrc and add syntax on in that file


vi ~/.vimrc
syntax on

save the file
and run your vim

Solution no. 5:

You might want to consider using a version of Vim that is a native Mac app (that runs in a window).

MacVim has great color schemes and you can still launch it from Terminal like so:

That will open your file in a new Vim window.

Colorscheme

Solution no. 6:

Mac os vim color schemes

@ashcatch – Can’t leave a comment, but wanted to add that iTerm has other advantages over Terminal.app such as sensible copy and paste (configurable ‘word’ regex for easy double click selection of paths/urls, middle click paste) and terminal mouse support (:se mouse=a in vi to get mouse text selection, moving of window borders etc.)

I’d be lost without it.

Hope this helps!