~dricottone/vim-markdown-preview

e6729c07f2a7e4d501cffe2125f47dc0628852d9 — Jamshed Vesuna 10 years ago ef2edea
Changed mapping to Ctrl-p instead of write until bux is fixed.
2 files changed, 4 insertions(+), 4 deletions(-)

M README.md
M plugin/vim-markdown-preview.vim
M README.md => README.md +2 -2
@@ 18,14 18,14 @@ Requirements

Usage
=====
When in a *.markdown or *.md file, vim-markdown-preview does the following on a write to the buffer:
When in a *.markdown or *.md file, vim-markdown-preview does the following when you type `Ctrl-p`:

* If you are not previewing the current file:
    * Open an html rendered version of your file in Google Chrome in the background.
* Otherwise:
    * Refresh your preview of the current markdown file in Google Chrome.

Uncomment the last line in `plugin/vim-markdown-preview.vim` to map `Ctrl-p` to the above instead of on write.
Uncomment the last line in `plugin/vim-markdown-preview.vim` to map a buffer write to the above instead of `Ctrl-p`.

Behind The Scenes
=================

M plugin/vim-markdown-preview.vim => plugin/vim-markdown-preview.vim +2 -2
@@ 21,5 21,5 @@ function! Vim_Markdown_Preview()
  call system('rm /tmp/vim-markdown-preview.html')
endfunction

autocmd BufWritePost *.markdown,*.md :call Vim_Markdown_Preview()
"autocmd Filetype markdown,md map <buffer> <C-p> :call Vim_Markdown_Preview()<CR>
autocmd Filetype markdown,md map <buffer> <C-p> :call Vim_Markdown_Preview()<CR>
"autocmd BufWritePost *.markdown,*.md :call Vim_Markdown_Preview()