1 "------------------------------------------------------------------------------
2 " Description: Vim Ada/Dec Ada compiler file
3 " Language: Ada (Dec Ada)
4 " $Id: decada.vim,v 1.4 2007/05/12 13:30:23 vimboss Exp $
5 " Copyright: Copyright (C) 2006 Martin Krischik
6 " Maintainer: Martin Krischik
8 " $Date: 2007/05/12 13:30:23 $
11 " $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
12 " History: 21.07.2006 MK New Dec Ada
13 " 15.10.2006 MK Bram's suggestion for runtime integration
14 " 05.11.2006 MK Bram suggested not to use include protection for
16 " 05.11.2006 MK Bram suggested to save on spaces
17 " Help Page: compiler-decada
18 "------------------------------------------------------------------------------
24 function decada#Unit_Name () dict " {{{1
25 " Convert filename into acs unit:
26 " 1: remove the file extenstion.
27 " 2: replace all double '_' or '-' with an dot (which denotes a separate)
28 " 3: remove a trailing '_' (wich denotes a specification)
29 return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
30 endfunction decada#Unit_Name " }}}1
32 function decada#Make () dict " {{{1
33 let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
34 let &errorformat = g:self.Error_Format
35 let &makeprg = l:make_prg
41 endfunction decada#Build " }}}1
43 function decada#Set_Session (...) dict " {{{1
45 call ada#Switch_Session (a:1)
46 elseif argc() == 0 && strlen (v:servername) > 0
47 call ada#Switch_Session (
48 \ expand('~')[0:-2] . ".vimfiles.session]" .
49 \ v:servername . ".vim")
52 endfunction decada#Set_Session " }}}1
54 function decada#New () " }}}1
56 \ 'Make' : function ('decada#Make'),
57 \ 'Unit_Name' : function ('decada#Unit_Name'),
58 \ 'Set_Session' : function ('decada#Set_Session'),
60 \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
61 \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
62 \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
65 endfunction decada#New " }}}1
69 "------------------------------------------------------------------------------
70 " Copyright (C) 2006 Martin Krischik
72 " Vim is Charityware - see ":help license" or uganda.txt for licence details.
73 "------------------------------------------------------------------------------
74 " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
75 " vim: foldmethod=marker