Skip to content
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

Feature Request: Markdown Copy #141

Open
jwworth opened this issue Nov 19, 2020 · 1 comment
Open

Feature Request: Markdown Copy #141

jwworth opened this issue Nov 19, 2020 · 1 comment

Comments

@jwworth
Copy link

jwworth commented Nov 19, 2020

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.

@vds2212
Copy link

vds2212 commented Jan 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants