greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

Does not work in new unsaved buffer #24

Closed charlax closed 12 years ago

charlax commented 12 years ago

Hi,

vim-preview does not work in an unsaved buffer:

Error detected while processing function <SNR>23_Preview..preview#show:
line    4:
TypeError: (eval):115:in `basename': can't convert nil into String

It seems hammer had the same issue.

Thanks!

Chx

greyblake commented 12 years ago

Can you please provide steps to reproduce? Vim-preview should handle this since it's use VIM::Buffer.current.name to get file name.

charlax commented 12 years ago

Sure!

  1. Open a new macvim buffer
  2. Set filetype to markdown: set ft=md (or set ft=markdown)
  3. Enter some markdown content
  4. Press ,P
greyblake commented 12 years ago

Fixed. Thanks for help!