gnatmake
to compile. More details are below. export PATH=$PATH:/Users/username/opt/GNAT/2019/bin
setenv PATH $PATH":/Users/username/opt/GNAT/2019/bin"
< apt-get install gnat-4.3 < apt-get install gnat-gps
Help/Help Contents
in Eclipse and
then Gnatbench Ada Development Guide/Before You Begin in Eclipse
Help
foo.adb
,
and that you want this to be your main program.
proj1.gpr
with these contents:project proj1 is for Main use ("foo"); end proj1;
gnatmake -P proj1
filetype indent on filetype plugin on syntax enable
:set makeprg=\ % :set errorformat=%f:%l:%c:\ %m,%f:%l:%c:\ %tarning:\ %m,%f:%l:%c:\ (%ttyle)\ %m
after
directory. c:\program_files
go to the c:\program files\vim
,
and if the subfolder vimfiles
does not exist, create it.
Then create subfolders vimfiles\after
and vimfiles\after\ftplugin
,
and in this subfolder create the file ada.vim
. In this
file put the lines
set makeprg=\ % set errorformat=%f:%l:%c:\ %m,%f:%l:%c:\ %tarning:\ %m,%f:%l:%c:\ (%ttyle)\ %mNow restart vim and you are done.
Test this by creating a program that has some syntax errors and doing :make. After the make command, the cursor should jump to the the first syntax error. If there are more errors, the commands :cn and :cp should jump to the next and previous error. You can split a window showing all of the errors with :copen. Use split window commands to go back and forth between the error window and the regular window. You can close the error window with the command :cclose in the window or with the command :only in the source code window.
.vimrc
file:let g:ada_default_compiler="gnat" let g:mapleader="\\"
:make
,
do the following: .vim
in your home directory
(ie H:\ drive) ada.vim
and
add the lines set makeprg=gnatmake\ % set autowrite " if you want automatic saves prior to compiling set tabstop=4 " my preference for tabs set shiftwidth=4 " my preference for shifts