rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.99k stars 196 forks source link

Italics in markdown not working #114

Open chris414862 opened 3 years ago

chris414862 commented 3 years ago

Hello, I noticed today that italics do not seem to work for markdown files (at least for me). They work in comments in other file types, they just don't show up in markdown files. When I disable the vim-one theme though, standard vim is able to italicize it correctly. Is there any way to fix this?

Thank you

chris414862 commented 3 years ago

I fixed this line in the markdown section of the colors/one.vim file from this: call <sid>X('markdownItalic', s:hue_6, '', 'bold') to call <sid>X('markdownItalic', s:hue_6, '', s:italic) You should also, of course, enable italics for vim-one like it says in the README (I had already done this though) UPDATE: Additionally I found that bold + italics didn't render as well. For example, ***BoldAndItalic*** did not render as ***BoldAndItalic*** just ***BoldAndItalic***. A simple fix to this was to add the line

  call <sid>X('markdownBoldItalic',           s:hue_6,   '',  'bold,italic')

below the line stated above. This breaks the standard of enabling/disabling italics though so if that is important to you, you can add:

let s:italic = ''
let s:bolditalic = ''              ### <---- Add this line
if g:one_allow_italics == 1
  let s:bolditalic = 'bold,italic' ### <---- Add this line
  let s:italic = 'italic'
endif

in the corresponding spot in the one.vim file (around line 30 in my version) and then add:

  call <sid>X('markdownBoldItalic',           s:hue_6,   '',  s:bolditalic)

instead of the one with the hard coding.

BlueDrink9 commented 3 years ago

@chris414862 would you consider making this a pull request so @rakr can incorporate these changes easily?

chris414862 commented 3 years ago

@chris414862 would you consider making this a pull request so @rakr can incorporate these changes easily?

Sure! It should be up now.