1 "==============================================================================
2 " FileName: applescript.vim
3 " Desc: Syntax checking plugin for syntastic.vim
5 " Email: caizhaoff@gmail.com
7 " Date Created: Thu 09 Sep 2011 10:30:09 AM EST
8 " Last Modified: Fri 09 Dec 2011 01:10:24 PM EST
10 " History: 0.1.0 - working, but it will run the script everytime to check
11 " syntax. Should use osacompile but strangely it does not give
14 " 0.2.0 - switch to osacompile, it gives less errors compared
17 " 0.2.1 - remove g:syntastic_applescript_tempfile. use
20 " License: This program is free software. It comes without any
21 " warranty, to the extent permitted by applicable law. You can
22 " redistribute it and/or modify it under the terms of the Do What The
23 " Fuck You Want To Public License, Version 2, as published by Sam
24 " Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details.
26 "============================================================================
28 if exists("loaded_applescript_syntax_checker")
31 let loaded_applescript_syntax_checker = 1
33 "bail if the user doesnt have osacompile installed
34 if !executable("osacompile")
38 function! SyntaxCheckers_applescript_GetLocList()
39 let makeprg = 'osacompile -o ' . tempname() . '.scpt '. shellescape(expand('%'))
40 let errorformat = '%f:%l:%m'
42 return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })