Skip to content

Instantly share code, notes, and snippets.

@skipcloud
Created January 27, 2020 08:51
Show Gist options
  • Select an option

  • Save skipcloud/953b62ec958ab35ff399e40b96a2f76a to your computer and use it in GitHub Desktop.

Select an option

Save skipcloud/953b62ec958ab35ff399e40b96a2f76a to your computer and use it in GitHub Desktop.
How about some colour in your git commits?

Most of you use vim everyday as it's the default editor that is opened when editing git commits. Instead of dealing with a wall of white text why not enable syntax highlighting? If you use vim as your editor or you have $EDITOR set to something else then this one isn't as useful for you.

Create a file .vimrc in your home directory with syntax on. This file is sourced everytime you start vim.

echo syntax on >> $HOME/.vimrc

There's a bunch of default colour schemes to choose from, to enable one just append colorscheme <name-of-color-scheme> to your .vimrc

blue
darkblue
default
delek
desert
elflord
evening
industry
koehler
morning
murphy
pablo
peachpuff
ron
shine
slate
tools
torte
zellner

Now all your dealings with git commits, rebases etc will be nicely syntax highlighted for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment