vim-colors-solarized icon indicating copy to clipboard operation
vim-colors-solarized copied to clipboard

Highlight definitions for vim-gitgutter

Open jwhitley opened this issue 12 years ago • 11 comments

This change adds support for vim-gitgutter highlight definitions. It also changes the SignColumn background to be the same as LineNr, as suggested in #26, for visual consistency when both gitgutter and line numbering are active.

jwhitley avatar Mar 05 '13 21:03 jwhitley

/cc @airblade

jwhitley avatar Mar 05 '13 21:03 jwhitley

Arguably SignColumn should use hi! link SignColumn LineNr instead of what I've got above. I based my first commit off of #26, but now see that a first-class link appears preferable.

jwhitley avatar Mar 05 '13 21:03 jwhitley

:+1:

jamescmartinez avatar Mar 24 '13 19:03 jamescmartinez

For everyone else who comes across this and wants a fix immediately, you can add highlight clear SignColumn to your vimrc. It will use the same color as your line number column.

jamescmartinez avatar Mar 24 '13 19:03 jamescmartinez

If using the toggle background function, the hunk marker colours are lost. Could you confirm @jwhitley?

Edit: vim-gutter#77 fixes this.

Also, I think this looks even neater using hi! link SignColumn Background (like in vim-gutter's screenshot). Thoughts?

tlvince avatar Apr 07 '13 12:04 tlvince

@tlvince In the screenshot vim-gitgutter is linking SignColumn to LineNr.

airblade avatar Apr 08 '13 07:04 airblade

+1

I tried adding hi! link SignColumn Background to my .vimrc; but it doesn't seem to have worked; I still get a fugly-ass grey gutter on new vims. I even tried this:

autocmd ColorScheme * highlight link SignColumn LineNr

Unfortunately, no dice:

… maybe I'm just doing something idiotic? I don't know; I'm anything but a vim wizard. This is atrociously ugly though, I want to get it fixed as soon as possible!

ELLIOTTCABLE avatar Jun 02 '13 17:06 ELLIOTTCABLE

autocmd ColorScheme * highlight clear SignColumn

works for me:)

wish this pull-request will be merged ASAP.

EDIT :

Only using the line above in vimrc will work only when you change your colorscheme. The following is what I finally added to my vimrc highlight clear SignColumn autocmd ColorScheme * highlight clear SignColumn

ysheng26 avatar Jul 10 '13 05:07 ysheng26

I found I just needed:

highlight SignColumn ctermbg=8

after the line:

colorscheme solarized

As I wanted the sign column to be the darker background color. This makes it the same background color as lines with the signs (and doesn't make the line numbers column look odd).

PhilT avatar Jul 27 '13 23:07 PhilT

Awesome @philT, that worked, many thanks. :metal:

IanVaughan avatar Nov 27 '13 09:11 IanVaughan

Here's an improved version, combining @ShengYun's observation, and @airblade's about LineNr:

" ... until https://github.com/altercation/vim-colors-solarized/pull/62
fun! FixSignColumn()
   highlight clear SignColumn
   highlight link SignColumn LineNr
endfun

call FixSignColumn()
au ColorScheme * call FixSignColumn()

I'm no VimScript expert; this can probably be condensed, but, whatever. :P

ELLIOTTCABLE avatar Jul 04 '15 00:07 ELLIOTTCABLE