gnat.vim 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. "------------------------------------------------------------------------------
  2. " Description: Vim Ada/GNAT compiler file
  3. " Language: Ada (GNAT)
  4. " $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
  5. " Copyright: Copyright (C) 2006 Martin Krischik
  6. " Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
  7. " Ned Okie <nokie@radford.edu>
  8. " $Author: krischik $
  9. " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
  10. " Version: 4.6
  11. " $Revision: 887 $
  12. " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
  13. " 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
  16. " 19.09.2007 NO use project file only when there is a project
  17. " Help Page: compiler-gnat
  18. "------------------------------------------------------------------------------
  19. if (exists("current_compiler")&& current_compiler == "gnat") || version < 700
  20. finish
  21. endif
  22. let s:keepcpo= &cpo
  23. set cpo&vim
  24. let current_compiler = "gnat"
  25. if !exists("g:gnat")
  26. let g:gnat = gnat#New ()
  27. call ada#Map_Menu (
  28. \ 'GNAT.Build',
  29. \ '<F7>',
  30. \ 'call gnat.Make ()')
  31. call ada#Map_Menu (
  32. \ 'GNAT.Pretty Print',
  33. \ ':GnatPretty',
  34. \ 'call gnat.Pretty ()')
  35. call ada#Map_Menu (
  36. \ 'GNAT.Tags',
  37. \ ':GnatTags',
  38. \ 'call gnat.Tags ()')
  39. call ada#Map_Menu (
  40. \ 'GNAT.Find',
  41. \ ':GnatFind',
  42. \ 'call gnat.Find ()')
  43. call ada#Map_Menu (
  44. \ 'GNAT.Set Projectfile\.\.\.',
  45. \ ':SetProject',
  46. \ 'call gnat.Set_Project_File ()')
  47. call g:gnat.Set_Session ()
  48. endif
  49. if exists(":CompilerSet") != 2
  50. "
  51. " plugin loaded by other means then the "compiler" command
  52. "
  53. command -nargs=* CompilerSet setlocal <args>
  54. endif
  55. execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
  56. execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
  57. let &cpo = s:keepcpo
  58. unlet s:keepcpo
  59. finish " 1}}}
  60. "------------------------------------------------------------------------------
  61. " Copyright (C) 2006 Martin Krischik
  62. "
  63. " Vim is Charityware - see ":help license" or uganda.txt for licence details.
  64. "------------------------------------------------------------------------------
  65. " vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
  66. " vim: foldmethod=marker