itchyny / calendar.vim

A calendar application for Vim
MIT License
1.97k stars 73 forks source link

Remove sunday background color #54

Closed petobens closed 10 years ago

petobens commented 10 years ago

How can I remove Sunday date numbers background color? I know I can change this line to

call calendar#color#syntax('Sunday', s:sunday_fg_color, '', '')

But I was wondering how to do it from my vimrc or colorscheme.

Thanks!

itchyny commented 10 years ago
autocmd FileType calendar hi! link CalendarSunday Normal
autocmd FileType calendar hi! link CalendarTodaySunday Normal
petobens commented 10 years ago

I don't want Sunday numbers to be shown as regular numbers. I do want them to be shown in a red color but I don't want background highlighting. Currently they are shown as in the first image. I want them to be like in the second image. I know I can do this changing

call calendar#color#syntax('Sunday', s:sunday_fg_color, '', '')

But I want to do that from my vimrc. How should I do it? In the docs there is syntax entry in the table of contents but no explanation afterwards.

screenshot-08-09-2014_00-12-50 screenshot-08-09-2014_00-13-41

itchyny commented 10 years ago

How about

autocmd FileType calendar call calendar#color#syntax('Sunday', has('gui') ? '#ff0000' : 196, '', '')
petobens commented 10 years ago

@itchyny thank you that worked! Excellent plugin btw.