Macos Vim Color



# This is a basic configuration example for SpaceVim # All SpaceVim options are below options snippet options # set spacevim theme. By default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer, the value of this option is a string. Colorscheme = 'gruvbox' colorschemebg = 'dark' # Disable guicolors in basic mode, many terminal do. ' This.vimrc file should be placed in your home directory ' The Terminal app supports (at least) 16 colors ' So you can have the eight dark colors and the eight light colors ' the plain colors, using these settings, are the same as the light ones.

  1. Mac Os Vim Color Scheme
  2. Macos Vim Color Setting
  3. .vimrc
  4. Macos Vim Highlighting

All configuration options for vim are stored in the user’s home directory in a file named .vimrc

The script code is below but there are somethings you’ll want to do before setting it up.

You’ll need to create directories for the following: backups, colors, swaps and undo. Dungeon defenders free mac download.

Macos vim color setting

Execute this command to set up the directories in the terminal ( The ~ character will set the path to your home directory. ex: /Users/username/ ):

Macos Vim Color

$ cd ~/.vim ; mkdir backups ; mkdir colors ; mkdir swaps; mkdir undo;

This will keep all your backups, swaps and undos in your .vim user directory. Also the colors directory is for installing themes.

Macos Vim Color

Visit vimninjas.com if you would like to download a color scheme. Once you find a color scheme you like, just download it and copy and paste the code into the relevant scheme file and place the file in ~/.vim/colors/

For example if you download the Candy theme, you would name the file candy.vim and place it in the relevant directory described above. Then in your .vimrc config file you would set the theme like so:

I've created a github repo with the .vimrc configuration. Please take a look at the repo and download from here.

Checkout or download the git zip and setup the .vimrc file by using the cp command.

$ cd ~/Downloads/MacOSVimConfig-master
$ cp vimrc-example ~/.vimrc

Otherwise you can create your .vimrc file by copying the Raw text from github and pasting the text below. NOTE: While in vim before you paste try doing this command.

:set paste

This should paste the text with the best result. Once the .vimrc file is configured open a new terminal windows and open a file to test out the setup.

$ vim ~/.vimrc

Vim

------------ .vimrc example configuration ------------------

Then paste in these configuration options:

MacOS is awesome for command line stuff, that’s why real Java programmers love it. But some of the defaults Apple have used make me sad. Where are all the colors? I demand my ls command be pretty and colorful!

Why is Vim so bland?

I have seen several options on the web on how to adjust colors but some, albeit very good ones, make me uncomfortable with the type of installations that have to be performed in order to enable these themes.

So, after some digging and reading man pages on terminal coloring and ls I found a super-simple solution for decent terminal coloring.

If you have below questions then you are at right place:

  • Simple Tricks to Improve the Terminal Appearance
  • how do you change mac terminal theme
  • mac terminal color ls
  • change terminal color linux
  • Customize the colors of your Terminal in MacOS
  • Customizing the Terminal

Mac Os Vim Color Scheme

Let’s get started.

Option-1)

Step-1.

Open Terminal Window. You should see the color scheme like this:

Step-2.

Vim color scheme

Command: $ vi ~/.bash_profile and Enter Below lines and save file.

2
4
6
export CLICOLOR=1
export GREP_OPTIONS='--color=auto'

Step-3.

Command: $ source ~/.bash_profile to initialize profile in current window.

You should see color now:

  • CLICOLOR=1 simply enables coloring of your terminal.
  • LSCOLORS=… specifies how to color specific items.

Step-4.

Add some more coloring. Keep previously added lines and add these extra lines. This gives you a nice colored prompt.

2
PS1='[e[0;33m]u[e[0m]@[e[0;32m]h[e[0m]:[e[0;34m]w[e[0m]$ '

And you should see color for username and command line prompt:

Option-2)

Macos Vim Color Setting

  1. Open terminal window
  2. Click on Terminal Menu
  3. Click on Preference
  4. Modify profile as per below image
  5. Select profile for
    • On startup, open:
    • New windows open with
    • New tabs open with

.vimrc

I hope this helps you change terminal window colors easily.

Join the Discussion

Macos Vim Highlighting

If you liked this article, then please share it on social media. Still have any questions about an article, leave us a comment.

Other Popular Articles..