tybenz/vimdeck

Option to preserve markdown syntax highlighting

Closed this issue · 6 comments

Steps to reproduce:

  1. Create a markdown slideshow as usual.
  2. run vimdeck
  3. Your slideshow appears with formatting stripped for things such as *italics* or **bold**

Desired behaviour:
These should continue to exist in their basic markdown form to preserve that level of syntax highlighting. (As the slideshow is run in markdown syntax mode anyway)

Attached are some screenshots for visual reference. Thanks for your consideration of this issue.

screen shot 2013-11-06 at 5 31 46 am

screen shot 2013-11-06 at 5 32 25 am

It would be easy enough for me to tweak my redcarpet renderer to allow for the markdown syntax to remain.

The problem is that I'm indenting all of the slides. So most markdown syntax highlighters see the indented text as blockquotes or code and stop syntax highlighting altogether.

I could remove the indentation altogether and add the bold and italic syntax back in, but the slides are harder to read with the text squished against the left hand side of the screen.

I'm open to suggestions here though. Maybe a user option to remove the indentation. I'll definitely add in the change to the markdown renderer to leave in things like the *, _, and `

I wonder if it's possible to add a width using a 'left gutter' like this: http://stackoverflow.com/questions/7941427/macvim-how-do-i-set-a-left-gutter-margin-for-my-buffers ?

As an aside: I'm using a plugin to allow for local .vimrc in my presentations (https://github.com/MarcWeber/vim-addon-local-vimrc) which helps immensely.

Fixed! There is now a no-indent option in the latest version of vimdeck. The latest version also lets emphasis and code span syntax remain.

Thank you, this is working really well!.
One detail: H1 and H2 seem to still be indented. Not sure if this is the intended behaviour but worth mentioning if it's not a complicated fix.
Much obliged for the quick reply and my apologies for not being set up to assist with a pull request.

I actually had to leave in the indentation on the h1s and h2s. My markdown syntax highlighter freaks out on the ascii art unless it thinks it is a blockquote. Need to figure out a way to tell VIM not to syntax highlight the headers at all.