annotate runtime/autoload/decada.vim @ 19584:3aaaa407d308

Added tag v8.2.0348 for changeset ba35daca6553840791b5a4470cf24e1c3fd6cff6
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 Mar 2020 23:00:06 +0100
parents 7bc41231fbc7
children 3a1ed539ae2a
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)
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
4 " $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
5 " Copyright: Copyright (C) 2006 Martin Krischik
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1121
diff changeset
6 " Maintainer: Martin Krischik <krischik@users.sourceforge.net>
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
7 " $Author: krischik $
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
8 " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1121
diff changeset
9 " Version: 4.6
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1668
diff changeset
10 " $Revision: 887 $
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1121
diff changeset
11 " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
1121
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 (
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1121
diff changeset
48 \ expand('~')[0:-2] . ".vimfiles.session]decada_" .
1121
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