1125
|
1 "------------------------------------------------------------------------------
|
|
2 " Description: Vim Ada/GNAT compiler file
|
|
3 " Language: Ada (GNAT)
|
|
4 " $Id$
|
|
5 " Copyright: Copyright (C) 2006 Martin Krischik
|
|
6 " Maintainer: Martin Krischik
|
|
7 " $Author$
|
|
8 " $Date$
|
|
9 " Version: 4.2
|
|
10 " $Revision$
|
|
11 " $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
|
|
12 " History: 24.05.2006 MK Unified Headers
|
|
13 " 16.07.2006 MK Ada-Mode as vim-ball
|
|
14 " 15.10.2006 MK Bram's suggestion for runtime integration
|
|
15 " Help Page: compiler-gnat
|
|
16 "------------------------------------------------------------------------------
|
|
17
|
|
18 if (exists("current_compiler") &&
|
|
19 \ current_compiler == "gnat") ||
|
|
20 \ version < 700
|
|
21 finish
|
|
22 endif
|
|
23
|
|
24 let current_compiler = "gnat"
|
|
25
|
|
26 if !exists("g:gnat")
|
|
27 let g:gnat = gnat#New ()
|
|
28
|
|
29 call ada#Map_Menu (
|
|
30 \ 'GNAT.Build',
|
|
31 \ '<F7>',
|
|
32 \ 'call gnat.Make ()')
|
|
33 call ada#Map_Menu (
|
|
34 \ 'GNAT.Pretty Print',
|
|
35 \ ':GnatPretty',
|
|
36 \ 'call gnat.Pretty ()')
|
|
37 call ada#Map_Menu (
|
|
38 \ 'GNAT.Tags',
|
|
39 \ ':GnatTags',
|
|
40 \ 'call gnat.Tags ()')
|
|
41 call ada#Map_Menu (
|
|
42 \ 'GNAT.Find',
|
|
43 \ ':GnatFind',
|
|
44 \ 'call gnat.Find ()')
|
|
45 call ada#Map_Menu (
|
|
46 \ 'GNAT.Set Projectfile\.\.\.',
|
|
47 \ ':SetProject',
|
|
48 \ 'call gnat.Set_Project_File ()')
|
|
49 endif
|
|
50
|
|
51 if exists(":CompilerSet") != 2
|
|
52 "
|
|
53 " plugin loaded by other means then the "compiler" command
|
|
54 "
|
|
55 command -nargs=* CompilerSet setlocal <args>
|
|
56 endif
|
|
57
|
|
58 call g:gnat.Set_Session ()
|
|
59
|
|
60 execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
|
|
61 execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
|
|
62
|
|
63 finish " 1}}}
|
|
64
|
|
65 "------------------------------------------------------------------------------
|
|
66 " Copyright (C) 2006 Martin Krischik
|
|
67 "
|
|
68 " Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
|
69 "------------------------------------------------------------------------------
|
|
70 " vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
|
71 " vim: foldmethod=marker
|