Macos Vim



  1. Macos Vim Gui
  2. Macos Vim Save
  3. Macos Vimrc
  4. Mac Os Vim Syntax Highlighting

Question or issue on macOS:

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

However, this will not work in your vim+terminal. It only works in MacVim. The best shot for your intention is to map the combination as hex code, sending to terminal. Still I will not recommend doing this. Command is too important for mac os environment.

  • Download MacOSX Vim for free. Vim Binaries for MacOSX.
  • Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as 'vi' with most UNIX systems and with Apple macOS. To install the latest version, use homebrew: brew install vim The Ultimate vimrc.
  • Vim - the text editor - for macOS. Contribute to macvim-dev/macvim development by creating an account on GitHub.
  • Recording a macro is a great way to perform a one-time task, or to get things done quickly when you don't want to mess with Vim script or mappings, or if you do not yet know how to do it more elegantly. In Vim, the word 'macro' may refer to: A sequence of commands recorded to a register (this tip).

Then this…

Vim

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.

Macos

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?

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. You can try adding syntax on inside ~/.vimrc file.

It will highlight your code syntax on vim

Solution no. 3:

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

# vi /usr/share/vim/vimrc

Add this line at the end of the file:

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

Macos Vim Gui

Solution no. 4:

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

Macos


vi ~/.vimrc
syntax on

Macos Vim Save

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.

Solution no. 6:

Macos Vimrc

@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.

Mac Os Vim Syntax Highlighting

Hope this helps!