vim-pandoc-syntax icon indicating copy to clipboard operation
vim-pandoc-syntax copied to clipboard

Automatically enable code block highlighting for code blocks with specified language

Open naught101 opened this issue 10 years ago • 3 comments

It'd be nice if codeblocks like:

```python
blah blah
```

Were automatically highlighted using the python syntax (e.g. :PandocHighlight python). It'd be great if it was possible to do this with docs with multiple languages, but considering how rare that is, it's probably not really necessary. Maybe just enable code syntax when the first code block is parsed?

naught101 avatar Jul 16 '15 17:07 naught101

Also,

```{python}
blah
```

is a legitimate indicator that a codeblock is a python codeblock, but for me, it's not matching. Using vim-pandoc-syntax from git, just pulled.

naught101 avatar Sep 17 '15 07:09 naught101

Yeah, vim-markdown does this automatically. I'm considering moving from vim-markdown to vim-pandoc-syntax but this is a feature I would really miss if I switched.

mawkler avatar May 09 '20 21:05 mawkler

I would love to see this enabled in this plugin too. Right now I switch back and forth between the two syntax options depending on the project because they have different strengths and weaknesses. Adding language dependent code block syntax highlighting to this plugin would go a long way towards making that unecessary.

If anybody cares to contribute this know that I'll definitely be reviewing PRs with a favorable eye toward merging!

alerque avatar May 11 '20 06:05 alerque