dracula / vim

🧛🏻‍♂️ Dark theme for Vim
https://draculatheme.com/vim
MIT License
1.34k stars 454 forks source link

How dracula supports italics for comments #315

Closed Elite-zx closed 11 months ago

Elite-zx commented 11 months ago

What happened

What I expected to happen

dracula supports italics for comments

Screenshot

Machine Info

Linux ELITEZX 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

I used highlight Comment cterm=italic gui=italic (from here)to make the comment italicized, but this changed the color of the theme image image

benknoble commented 11 months ago

Please see :help dracula; I believe you need to make sure you have italics enabled. If that fails, you should customize the groups via autocommands as in the help.

Taking a quick peek at the colors file, it seems we don't default to italicized comments. We do link Comment to DraculaComment, so you'll want to modify the latter to make it italic.

Elite-zx commented 11 months ago

Please see :help dracula; I believe you need to make sure you have italics enabled. If that fails, you should customize the groups via autocommands as in the help.

Taking a quick peek at the colors file, it seems we don't default to italicized comments. We do link Comment to DraculaComment, so you'll want to modify the latter to make it italic.

Thank you!

image

I enabled the italics now, what autocommands do i need to add ? how can I modify the latter to make it italic ?

benknoble commented 11 months ago

Like the example:

augroup dracula_customization | autocmd!
  autocmd ColorScheme dracula highlight DraculaComment cterm=italic gui=italic
augroup end
Elite-zx commented 11 months ago

Thank you. Adding the following 2 lines to .vimrc solved my problem

"italic for comments
highlight DraculaComment cterm=italic gui=italic