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

Allows vim-preview to work in OSX #2

Closed milkypostman closed 13 years ago

milkypostman commented 13 years ago

Basically, Safari will not work if the extension is not html or some compatible extension. Something about the mime style not matching up. It ends up that Safari refers the file to Finder. The other thing I did was not generate a completely temporary file. This makes it so Safari will just reload the file after consecutive calls to preview, rather than opening a new tab each time.

Oh, I also make it so that if you want to list browsers with arguments you can do so. The test for application existence is done by the first element of the command. Basically, split the browser command on space and only check the first element.

greyblake commented 13 years ago

Hi! Good job! Thanks for your pull request. I've not tested it with Safari(I'm Linux user), so your help will be useful:)

milkypostman commented 13 years ago

Blake, just so you know, the one downside is that if two buffers share the same Filename, I think they will share a preview window. This really shouldn't ever be an issue. One option would be to append the buffer number to the base_name when you update the @base_name variable.

greyblake commented 13 years ago

It's good idea! Unfortunately I have no time to implement it right now because of session:(. If you want you can make it. Also I rolled out new version of plugin, so sync with my repository:)

milkypostman commented 13 years ago

Updated the pull request to a new feature. This fixes a bug with the new changes which didn't allow me to use it in OSX again :)

greyblake commented 13 years ago

closed