0

I am working with markdown and writing snippets like:

    ```c
    int
    main()
    {
        return 0;
    }
    ```

It is highlighted as a code in vim.

Vim

However would it possible for the c section to have the syntax of a normal c file? I was checking out pyvim and it has such a feature.

Pyvim

Wondering if I can bring it in vim?

Nishant
  • 207
  • 1
  • 5

1 Answers1

3

Upstream repo for the runtime files for markdown has a README which describes this. Add to your vimrc:

let g:markdown_fenced_languages = ['c']

enter image description here

Hotschke
  • 4,740
  • 26
  • 37