"ant.vim : VIM menu for using ant "Another Neat Tool (http://jakarta.apache.org/ant/index.html) "Author : Shad Gregory " "globals let g:buildFile = 'build.xml' if exists("loaded_antmenu") aunmenu ANT endif "keyboard shortcuts map ,b :call DoAntCmd('-buildfile',g:buildFile) map ,s :call SetBuildFile() "build ant menu amenu &ANT.\ &Build.\ &Default :call DoAntCmd('-buildfile',g:buildFile) amenu &ANT.\ &Build.\ &Find :call DoAntCmd('-find',g:buildFile) amenu &ANT.\ &Build.\ &Debug :call DoAntCmd('-debug -buildfile',g:buildFile) amenu &ANT.\ &Build.\ &Verbose :call DoAntCmd('-verbose -buildfile',g:buildFile) amenu &ANT.\ &Build.\ &Quiet :call DoAntCmd('-quiet -buildfile',g:buildFile) amenu &ANT.\ &Set\ build\ file :call SetBuildFile() amenu &ANT.\ &ANT\ Help :call DoAntCmd('--help') amenu &ANT.\ &ANT\ Version :call DoAntCmd('-version') if !exists("loaded_antmenu") let loaded_antmenu=1 endif "Allows user to set build.xml. If the file does not exist, gives a "statusline message and resets buildFile back to default. function! SetBuildFile() let g:buildFile=escape(input('build.xml location: '), '"<>|&') if !filereadable(g:buildFile) redraw echo g:buildFile.' does not exist!' let g:buildFile = './build.xml' return endif new exec 'read '.g:buildFile exec 'g/^$/d' "leave only target tags exec 'g!/^\s