From 7826214df1cf0313ef074fe19712d015d49aaed3 Mon Sep 17 00:00:00 2001 From: Matteo Cerutti Date: Mon, 9 May 2016 17:20:32 -0400 Subject: [PATCH] when running OSX, has('unix) returns true - this is now handled better. --- plugin/vim-markdown-preview.vim | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 3c1a1aa..7794a86 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -32,17 +32,19 @@ endif let g:vmp_osname = 'Unidentified' -if has('win32') +if has('win32') || has('win64') " Not yet used let g:vmp_osname = 'win32' -endif -if has('unix') - let g:vmp_osname = 'unix' -endif -if has('mac') - let g:vmp_osname = 'mac' - let g:vmp_search_script = g:vmp_script_path . '/applescript/search-for-vmp.scpt' - let g:vmp_activate_script = g:vmp_script_path . '/applescript/activate-vmp.scpt' +elseif has('unix') + let s:uname = system("uname") + + if has('mac') || has('macunix') || has("gui_macvim") || s:uname == "Darwin\n" + let g:vmp_osname = 'mac' + let g:vmp_search_script = g:vmp_script_path . '/applescript/search-for-vmp.scpt' + let g:vmp_activate_script = g:vmp_script_path . '/applescript/activate-vmp.scpt' + else + let g:vmp_osname = 'unix' + endif endif -- 2.45.2