annotate runtime/autoload/decada.vim @ 1430:342cf2a9f5cc v7.1.145

updated for version 7.1-145
author vimboss
date Fri, 19 Oct 2007 18:40:51 +0000
parents e63691e7c504
children 0b796e045c42
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
1 "------------------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
2 " Description: Vim Ada/Dec Ada compiler file
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
3 " Language: Ada (Dec Ada)
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
4 " $Id$
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
5 " Copyright: Copyright (C) 2006 Martin Krischik
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
6 " Maintainer: Martin Krischik
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
7 " $Author$
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
8 " $Date$
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
9 " Version: 4.2
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
10 " $Revision$
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
11 " $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
12 " History: 21.07.2006 MK New Dec Ada
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
13 " 15.10.2006 MK Bram's suggestion for runtime integration
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
14 " 05.11.2006 MK Bram suggested not to use include protection for
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
15 " autoload
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
16 " 05.11.2006 MK Bram suggested to save on spaces
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
17 " Help Page: compiler-decada
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
18 "------------------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
19
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
20 if version < 700
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
21 finish
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
22 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
23
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
24 function decada#Unit_Name () dict " {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
25 " Convert filename into acs unit:
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
26 " 1: remove the file extenstion.
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
27 " 2: replace all double '_' or '-' with an dot (which denotes a separate)
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
28 " 3: remove a trailing '_' (wich denotes a specification)
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
29 return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
30 endfunction decada#Unit_Name " }}}1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
31
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
32 function decada#Make () dict " {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
33 let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
34 let &errorformat = g:self.Error_Format
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
35 let &makeprg = l:make_prg
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
36 wall
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
37 make
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
38 copen
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
39 set wrap
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
40 wincmd W
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
41 endfunction decada#Build " }}}1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
42
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
43 function decada#Set_Session (...) dict " {{{1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
44 if a:0 > 0
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
45 call ada#Switch_Session (a:1)
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
46 elseif argc() == 0 && strlen (v:servername) > 0
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
47 call ada#Switch_Session (
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
48 \ expand('~')[0:-2] . ".vimfiles.session]" .
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
49 \ v:servername . ".vim")
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
50 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
51 return
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
52 endfunction decada#Set_Session " }}}1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
53
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
54 function decada#New () " }}}1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
55 let Retval = {
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
56 \ 'Make' : function ('decada#Make'),
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
57 \ 'Unit_Name' : function ('decada#Unit_Name'),
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
58 \ 'Set_Session' : function ('decada#Set_Session'),
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
59 \ 'Project_Dir' : '',
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
60 \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
61 \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
62 \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
63
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
64 return Retval
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
65 endfunction decada#New " }}}1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
66
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
67 finish " 1}}}
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
68
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
69 "------------------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
70 " Copyright (C) 2006 Martin Krischik
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
71 "
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
72 " Vim is Charityware - see ":help license" or uganda.txt for licence details.
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
73 "------------------------------------------------------------------------------
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
74 " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
75 " vim: foldmethod=marker