Skip to content

Commit

Permalink
Fixing to work on Mac OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
spf13 committed Mar 16, 2011
1 parent 3bbbb20 commit 6780b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/preview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ command! PreviewRonn call s:PreviewRonn()

" Default options
if(!exists('g:PreviewBrowsers'))
let g:PreviewBrowsers = 'firefox,safari,chromium-browser,epiphany,google-chrome,opera'
let g:PreviewBrowsers = 'open,firefox,safari,chromium-browser,epiphany,google-chrome,opera'
endif
if(!exists('g:PreviewCSSPath'))
let g:PreviewCSSPath = ''
Expand Down

2 comments on commit 6780b96

@greyblake
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! thanks for commit but open is specific command for OS X. It will not work on Linux.
If we want to use open for OS X, we should use condition if operating system is OS X.
To get kind of OS system('uname') can be used.
uname shell command returns name of kernel. For Linux it's Linux but I don't know what value it returns for OS X.

@telemachus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uname shell command returns name of kernel. For Linux it's Linux but I don't know what value it returns for OS X

It returns Darwin.

Please sign in to comment.