Loading ...
Sorry, an error occurred while loading the content.

how do i get vim to run these commands when i type make

Expand Messages
  • jinxjinx
    how can i get vim to run these commands when i type make? $ javac TestT.java $ gcj -g --main=TestT -o TestT TestT.class right now i use this to compile java
    Message 1 of 2 , Sep 28, 2006
    • 0 Attachment
      how can i get vim to run these commands when i type make?
      $ javac TestT.java
      $ gcj -g --main=TestT -o TestT TestT.class


      right now i use this to compile java
      set makeprg=javac\ %
      set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#

      but i want to be able to debug java with gdb (jdb sucks)

      thanks
      --
      View this message in context: http://www.nabble.com/how-do-i-get-vim-to-run-these-commands-when-i-type-make-tf2354129.html#a6556957
      Sent from the Vim - Dev mailing list archive at Nabble.com.
    • A.J.Mechelynck
      ... (untested) ... #!/bin/bash javac $1.java gcj -g --main=$1 -o $1 $1.class ... Best regards, Tony.
      Message 2 of 2 , Sep 28, 2006
      • 0 Attachment
        jinxjinx wrote:
        > how can i get vim to run these commands when i type make?
        > $ javac TestT.java
        > $ gcj -g --main=TestT -o TestT TestT.class
        >
        >
        > right now i use this to compile java
        > set makeprg=javac\ %
        > set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
        >
        > but i want to be able to debug java with gdb (jdb sucks)
        >
        > thanks

        (untested)

        :new ~/bin/javacomp
        #!/bin/bash
        javac $1.java
        gcj -g --main=$1 -o $1 $1.class

        :!chmod 755 ~/bin/javacomp

        :set makeprg=javacomp\ %:r


        Best regards,
        Tony.
      Your message has been successfully submitted and would be delivered to recipients shortly.