"ant.vim : VIM menu for using ant (http://jakarta.apache.org/ant/index.html) "Author : Shad Gregory " "globals if filereadable('./build.xml') let g:buildFile = './build.xml' endif if exists("loaded_antmenu") aunmenu ANT endif amenu &ANT.\ &Default\ Build :call DoAntCmd('-buildfile',g:buildFile) amenu &ANT.\ &Debug\ Build :call DoAntCmd('-debug -buildfile',g:buildFile) amenu &ANT.\ &Verbose\ Build :call DoAntCmd('-verbose -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