blob: d7ec55b97dd1c78ed9085bb4125aed3301384b1e [file] [log] [blame]
Bram Moolenaarc81e5e72007-05-05 18:24:42 +00001"------------------------------------------------------------------------------
2" Description: Vim Ada/GNAT compiler file
3" Language: Ada (GNAT)
Bram Moolenaar5c736222010-01-06 20:54:52 +01004" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
Bram Moolenaarc81e5e72007-05-05 18:24:42 +00005" Copyright: Copyright (C) 2006 Martin Krischik
Bram Moolenaarc236c162008-07-13 17:41:49 +00006" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
7" Ned Okie <nokie@radford.edu>
Bram Moolenaar5c736222010-01-06 20:54:52 +01008" $Author: krischik $
9" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
Bram Moolenaarc236c162008-07-13 17:41:49 +000010" Version: 4.6
Bram Moolenaar5c736222010-01-06 20:54:52 +010011" $Revision: 887 $
Bram Moolenaarc236c162008-07-13 17:41:49 +000012" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
Bram Moolenaarc81e5e72007-05-05 18:24:42 +000013" History: 24.05.2006 MK Unified Headers
14" 16.07.2006 MK Ada-Mode as vim-ball
15" 15.10.2006 MK Bram's suggestion for runtime integration
Bram Moolenaarc236c162008-07-13 17:41:49 +000016" 19.09.2007 NO use project file only when there is a project
Bram Moolenaarc81e5e72007-05-05 18:24:42 +000017" Help Page: compiler-gnat
18"------------------------------------------------------------------------------
19
20if (exists("current_compiler") &&
21 \ current_compiler == "gnat") ||
22 \ version < 700
23 finish
24endif
25
26let current_compiler = "gnat"
27
28if !exists("g:gnat")
29 let g:gnat = gnat#New ()
30
31 call ada#Map_Menu (
32 \ 'GNAT.Build',
33 \ '<F7>',
34 \ 'call gnat.Make ()')
35 call ada#Map_Menu (
36 \ 'GNAT.Pretty Print',
37 \ ':GnatPretty',
38 \ 'call gnat.Pretty ()')
39 call ada#Map_Menu (
40 \ 'GNAT.Tags',
41 \ ':GnatTags',
42 \ 'call gnat.Tags ()')
43 call ada#Map_Menu (
44 \ 'GNAT.Find',
45 \ ':GnatFind',
46 \ 'call gnat.Find ()')
47 call ada#Map_Menu (
48 \ 'GNAT.Set Projectfile\.\.\.',
49 \ ':SetProject',
50 \ 'call gnat.Set_Project_File ()')
Bram Moolenaarc236c162008-07-13 17:41:49 +000051
52 call g:gnat.Set_Session ()
Bram Moolenaarc81e5e72007-05-05 18:24:42 +000053endif
54
55if exists(":CompilerSet") != 2
56 "
57 " plugin loaded by other means then the "compiler" command
58 "
59 command -nargs=* CompilerSet setlocal <args>
60endif
61
Bram Moolenaarc81e5e72007-05-05 18:24:42 +000062execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
63execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
64
65finish " 1}}}
66
67"------------------------------------------------------------------------------
68" Copyright (C) 2006 Martin Krischik
69"
70" Vim is Charityware - see ":help license" or uganda.txt for licence details.
71"------------------------------------------------------------------------------
72" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
73" vim: foldmethod=marker