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

Use open-browser.vim for browser handling #9

Closed blueyed closed 12 years ago

blueyed commented 13 years ago

There is open-browser.vim which is a great abstraction to access a user's browser.

Please make use of it, if it's available. See how PasteBin implemented it for an example.

The current method would still get used as a fallback.

greyblake commented 13 years ago

I hesitate about do we really need this. I look at it deeper later. Thanks.

blueyed commented 13 years ago

You do not need it in the sense of an requirement, but it appears that there have been browser issues reported before, and it would just abstract this functionality into a good library instead.

Maybe just consider it again when the next browser issue arises.

greyblake commented 12 years ago

Since Vim doesn't have anything to hadle plugin depencies I will not use it. But thanks for think link! Looking through the source of open-browser I undestood than I can use usual call system('shell command') instead of hacked fork call via Ruby or Python. It helped completely avoid the fork bug in ruby1.9.

blueyed commented 12 years ago

Please consider reopening it, because it is possible by just checking for exists(":OpenBrowser") in your code, and then use this mechanism, leaving the current code in place (if you do not want to force users to install the open-browser plugin).

You do not have to depend on the open-browser plugin, but you could (e.g. by throwing an error if your plugin is used, but OpenBrowser is not available).

greyblake commented 12 years ago

Thanks for the suggestion. I don't think there are a lot of people who use both vim-preview and OpenBrowser, so there is no sense to make code more complicated.