You are not logged in.

#1 2013-03-28 21:46:00

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 166

Vim and Eclim (Java): Run Java program in embedded terminal window

Hello all,

I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.

The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.

So, this is what I would like to happen:
- I run my Java program somehow (doesn't have to be with :Java)
- A buffer containing the running program in a shell is put on the screen (if not already there)
- The program terminates, and the focus did not change to the output buffer

At the very least, I want the focus to not change to the output buffer after the program is done running.

Any ways to at least somewhat accomplish what I'm trying to  get at?

Offline

#2 2013-03-29 13:28:04

mychris
Member
From: Munich
Registered: 2012-09-15
Posts: 67

Re: Vim and Eclim (Java): Run Java program in embedded terminal window

I gave up using vim for java programming. I'm using intellij with the IdeaVim plugin, works for me.

Maybe take a look at vimux. You have to run vim inside a tmux session, but it looks as this plugin could solve your issues.

Offline

#3 2013-03-29 15:49:15

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 987

Re: Vim and Eclim (Java): Run Java program in embedded terminal window

I just gave up Java, it's a lot easier to do without than Vim. tongue

Offline

#4 2013-03-29 16:49:55

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 166

Re: Vim and Eclim (Java): Run Java program in embedded terminal window

Trent wrote:

I just gave up Java, it's a lot easier to do without than Vim. tongue

Yeah I wish I could just give it up that easily, I need to work on a final project for AP Computer Science class though, and all we do is Java.

Offline

#5 2013-03-29 17:26:10

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 987

Re: Vim and Eclim (Java): Run Java program in embedded terminal window

Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.

I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though hmm

Last edited by Trent (2013-03-29 17:26:41)

Offline

#6 2013-03-31 00:56:19

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 166

Re: Vim and Eclim (Java): Run Java program in embedded terminal window

Trent wrote:

Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.

I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though hmm

I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.

But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

Offline

Board footer

Powered by FluxBB