vim-css-color
vim-css-color copied to clipboard
Feature Request: Markdown Copy
Thank you so much for building and maintaining this plugin; it's so helpful!
I would love it if vim-css-color highlighted colors in the copy of a markdown file. The use case would be listing brand colors in a README, to be read by a programmer in Vim, as an example. If that's too obscure, please close the issue.
I did some investigation myself, and my challenge was that the init
function requires a list of keywords for consideration to colorize. Several keywords identified by my Vim configuration (htmlString
, htmlCommentPart
) already pick up the colorizing behavior in a markdown file, thanks to the html.vim
file in after/
. The additional feature would be for that colorizing to apply to any markdown content, not just HTML strings and comments. Thank you.
I had the same demand and I created a question about it in StackExchange/vi
Basically I propose to create a markdown.vim
in ~/.vim/after/syntax/
with the following content:
if match(&runtimepath, 'vim-css-color') != -1
call css_color#init('hex', 'none', 'mkdListItemLine,mkdNonListItemBlock')
endif
More information in the corresponding answer