Perhaps you could define some new filetype like md-presentation in which case you could use sotte/presenting.vim (that will require some vim script), or try to find some way to make presenting.vim override vim-markdown only in some specific directory, with the help of vim-plug's on: Plug option, if you are indeed using vim-plug (this will also. When we are editing Markdown files, it is nice to have some code snippets to improve efficiency. Fortunately, UltiSnips combined with vim-snippets 1 provides a lot of useful snippets for Markdown files. The two plugins can be install by vim-plug: Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets'.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. I would like to format all my Markdown headings. I write documentation in markdown using ViM and I also put math using the latex $$ symbol (I compile using pandoc). The thing is that ViM syntax wouldn't ignore the underscores inside the dollar symbols and it is pretty annoying. For instance if I write this.
Since I’ve moved back to using vim+tmux in the terminal for virtually all mywriting and code editing (and gotten faster in a number of respects), one of thekey things I’ve missed from Sublime Text 3 has been its excellent and speedymarkdown preview in Chrome.
It was a friction point in moving back to terminal vim since an old plugin I’dused before was no longer available, and the fallback I’d had to renderGithub-flavoured markdown was to use a combination of Tim Pope’sDispatch and the octodowngem. It had a number of issues, one of whichwas the time it took to shell out and then render the preview, but more thanthat, it just seemed to slow everything down.
In any case, one of our senior engineers alreadyhad a nice alternative, which also had the added advantage of live previews onsaved changes. Pretty simply, he used a Chrome extension, MarkdownReader(make sure you tick on the option for accessing File URLs, or it can’t accesslocal files).
I riffed on his solution slightly, after previewing a few different markdownpreviewers, and ended up using the excellentMarkviewinstead since you get the nice TOC that you get with Markdown Reader, a nicecopy-paste that will go into GMail’s Compose window nicely, the GH-flavouredmarkdown and syntax highlighting for fenced code blocks which comes in veryhandy (again, make sure you tick the option in Extensions for accessing fileURLs or it can’t preview local markdown files.)..
Vim Markdown Plugin
Then it’s a simple matter of connecting that to a simple open command in my
.vimrc
.On my OSX system, this creates the
MarkdownPreview
command which is thenlinked to the Ctrl-m
combination for easy launching (nb: The second <cr>
after the command seems to be the easiest way to auto-enter for the Press ENTER or type command to continue
prompt you get after executing an external commandand returning to the vim screen you’d want to see immediately.).It is quite fast and my only real complaint was wishing that Markdown Readersupported github-favoured markdown and the default Github (or generally nicer)stylesheet as well as syntax highlighting for code blocks.
Switching to Markview (which I do think is better in every way) fixed thateasily enough which takes care of everything but supporting GHF Task lists(which the very responsive author of Markview just kindly updated to work on2015-06-15 from my request.).
Vim Markdown Syntax
In any case, handy timesaver and very speedy. In fact, I’m using it to previewthis writing right now before posting. =]