0

I'm trying to edit my colour scheme in vim, and I remember when I was using Fedora I could get an easy preview of the colour when I changed it.

If I had a line like:

let ColourAssignment['String']          = {"GUIFG": 'LightYellow', "CTERMFG": '118'}

The word ColourAssignment would get hilighted as the colour I set 'string' to.

I'm using a mac now, but I have the same plugins and .vimrc as I had when using fedora.

Does anyone know what I need to set, or what plugin I could use to get this behavior again?

4 Answers4

1

It's not exactly what you ask for (it highlights the colors themselves, not the highlight group name), but I can highly recommend the Colorizer plugin.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • This plugin would be super useful for CSS/Web stuff. Unfortunately I'm hoping to get the colour based off the ctermfg number. – LeeGauthier Jul 17 '12 at 08:47
0

Maybe you want :hi String guifg=LightYellow ctermfg=118 and :syn match String /ColourAssignment/?

Conner
  • 30,144
  • 8
  • 52
  • 73
0

Alternatively, there are online Vim colorscheme editors, such as:

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
0

I found the exact solution I was looking for, it turns out there is a syntax file included with the bandit colour scheme that allows for this functionality.

The repository is: https://github.com/vim-scripts/bandit.vim