Skip to content

Commit

Permalink
added error message if doc could not be found
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael authored and Michael committed Dec 26, 2009
1 parent db51089 commit 4944075
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions autoload/objc/man.vim
Expand Up @@ -32,9 +32,18 @@ fun s:OpenFile(file)
if a:file =~ '/.*/man/'
exe ':!'.substitute(&kp, '^man -s', 'man', '').' '.a:file
else
" /usr/bin/open strips the #fragments in file:// URLs, which we need,
" so I'm using applescript instead.
call system('osascript -e ''open location "file://'.a:file.'"'' &')
" Sometimes Xcode doesn't download a bundle fully, and docsetutil is
" inaccurate.
if !filereadable(a:file)
echoh ErrorMsg
echom 'File "'.a:file.'" is not readable.'
echom 'Check that Xcode has fully downloaded the DocSet.'
echoh None
else
" /usr/bin/open strips the #fragments in file:// URLs, which we need,
" so I'm using applescript instead.
call system('osascript -e ''open location "file://'.a:file.'"'' &')
endif
endif
endf

Expand Down

0 comments on commit 4944075

Please sign in to comment.