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

Syntax highlight triple backticked (pre) sections #175

Open
mcandre opened this issue Feb 18, 2015 · 8 comments
Open

Syntax highlight triple backticked (pre) sections #175

mcandre opened this issue Feb 18, 2015 · 8 comments

Comments

@mcandre
Copy link

mcandre commented Feb 18, 2015

Could we have vim-markdown highlight triple-backticked ( `) sections as PRE-formatted code blocks?

@lazyfrosch
Copy link

You mean the actual syntax highlighting of the code? That might be hard

@mcandre
Copy link
Author

mcandre commented Feb 20, 2015

No, haha. Just highlight all text inside the backticks as one uniform color.

@lazyfrosch
Copy link

Can you give a code example where it does not work?

@mcandre
Copy link
Author

mcandre commented Feb 20, 2015

Sure!

None of the triple-backticked code sections in https://raw.githubusercontent.com/mcandre/cheatsheets/master/vim.md are highlighted.

I'm using Benokai for my color theme, in case that matters.

@cirosantilli
Copy link
Collaborator

@mcandre I don't reproduce: to me they appear with the same color / syntax ID as inline code:

out `inline` in

Does your inline code highlight?

@mcandre
Copy link
Author

mcandre commented Feb 21, 2015

No, my inline code does not highlight either. I'll bring Benokai into the conversation in case it's to blame.

@cirosantilli
Copy link
Collaborator

It looks like it's on Benokai.

More precisely, the syntax element is called mkdCode, and the line:

HtmlHiLink mkdCode          String

says that it looks like String, which is a standard Vim syntax element. So it this is the case, C-style strings like "adsf" in C code should not be highlighted either.

You could have found about mkdCode with:

    set laststatus=2
    set statusline=%{synIDattr(synID(line('.'),col('.'),1),'name')}

and hovering the cursor over the element.

@citizenmatt
Copy link
Contributor

See #93

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

No branches or pull requests

4 participants