-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Italicize comments in Vim #101
Conversation
This happened to me too, on Kitty with the light theme. I was able to fix it by adding this line to my .vimrc: hi Comment gui=NONE cterm=NONE This basically cancels out the change. It's weird because Kitty supposedly supports italic fonts. Maybe I don't have my fonts configured correctly. Edit: The font I'm using (Fira Code) apparently doesn't have an italic variant, which I guess results in the gray background. |
@fatteneder usually most terminals will have options to enable/disable bold and italic font styles. Maybe you can check your alacritty config? I don't use alacritty myself but a google search turned up some results such as this: alacritty/alacritty#1977. |
Terminals that don't support italics will indicate so in their terminfo file. AFAIK Alacritty and Kitty (which I use) both support italics. I'm guessing the issue you're seeing is probably @garrettn's suggestion that your font might not support italics. You should be able to specify a non-italic font in your terminal. For Alacritty, in your font:
italic:
family: Fira Code
style: Regular
bold_italic:
family: Fira Code
style: Bold For Kitty, in your
|
Thank you for all the replies. After I wrote this issue yesterday I did some research myself and also tried to enable an italic font in my Anyways, for now I will use @garrettn's fix till I figure out how to get italics to work. |
I have same issue as @fatteneder , my platform is macOS Big Sur with iTerm2 (font is Hack that support italic). I change line 126 on onehalf/vim/colors/onehalflight.vim
to
then it is ok. |
@fatteneder You can check this link to get italic to work. |
@jawang35 I suggest disable italic on the default setting, then add a vim variable to enable italic. |
@marcuslannister that's a good suggestion and it looks like other color schemes use the same pattern. I've implemented it in #108. |
If you still want comments in italic in iterm+tmux (taken from here):
File xterm-256color-italic.terminfo:
File tmux-256color-italic.terminfo:
Figure out how to set your terminals $TERM variable to xterm-256color-italic. In iTerm it's in Prefs -> profiles -> Terminal -> Report Terminal Type. In your .tmux.conf file:
You may also find this article useful (to enable italic in iterm): https://alexpearce.me/2014/05/italics-in-iterm2-vim-tmux/ |
Italicized comments are popular for Vim users and IMO they look pretty good. This won't have any effect on terminals that don't support italics.