r/java • • Nov 21 '17

Use Vim as a Java IDE

https://spacevim.org/use-vim-as-a-java-ide/
0 Upvotes

30 comments sorted by

7

u/AnEmortalKid Nov 21 '17

What if you need a debugger?

10

u/Dashing_McHandsome Nov 21 '17

How about what if you need to do some complex refactoring? In my IDE I can do something like extract an interface from an existing class. Sure, I could write a regex to do that in vim, but it is definitely faster to right click on my class and select extract interface.

2

u/knur Nov 26 '17

Right click? You mean you don't know the keyboard shortcut? 😪

0

u/[deleted] Nov 22 '17

[deleted]

3

u/Dashing_McHandsome Nov 22 '17

I might not be extracting interfaces too often, but refactoring in general is an area where IDEs shine.

2

u/[deleted] Nov 21 '17

in spacevim we use https://github.com/idanarye/vim-vebugger for debug java and many other language. it supports:

  • GDB - doesn't need introduction...

  • LLDB - debugger based on LLVM for C-family languages

  • JDB - a Java debugger

  • Mdbg - a .NET debugger(Windows only)

  • PDB - a Python module for debugging Python scripts

  • RDebug - a Ruby command line option for debugging Ruby scripts

5

u/Stannu Nov 21 '17

"System.out.println()" - is the only debugging tool you need, especially on enterprise level

7

u/oldprogrammer Nov 21 '17

Not sure if you're being sarcastic but this isn't far from the truth (though I like to use a level configurable logger). Sometimes you can't find issues using a step through debugger because they only surface in a real working environment and properly placed printlns (or logger messages) definitely help track them down.

2

u/Stannu Nov 21 '17

Logger sure. Writing straight to system out in production env? Doubt it

6

u/VioletPill Nov 21 '17

especially on enterprise level

What is this nonsense?

1

u/alexrio Nov 22 '17

You use eclim

2

u/AnEmortalKid Nov 23 '17

man I legit wanna see someone record themselves using this. Im intrigued.

7

u/[deleted] Nov 22 '17

This might make sense in odd cases where you have only ssh access to a development box (and no GUI). But in general I prefer the powerful and comfortable armchair-feeling of Intellij. :)

1

u/[deleted] Nov 22 '17

lord

yeah, if I am in gui, I still prefer to use IDE.

13

u/wildjokers Nov 21 '17

Just use IntelliJ with the IdeaVIM plugin and forget all that nonsense.

1

u/alexrio Nov 21 '17

Is it just vim-like movements or can it deal with plugins as well?

4

u/wildjokers Nov 21 '17

I have never seen any mention of plugin support. What VIM plugins are you interested in? I suspect the IDE probably already supports whatever functionality you are trying to get with a VIM plugin.

1

u/alexrio Nov 22 '17

it's more about being able to easily plug to rest of your pc/environment. Like dealing with multiple type of auto-completion: <C-x>f will autocomplete with filename of the current directory.

Easily switching from buffers without having to entirely remap my shortcuts.

-1

u/[deleted] Nov 21 '17

IntelliJ is a nice tools, but I still prefer CLI.

57

u/Dashing_McHandsome Nov 21 '17

Say it with me now, "a text editor is not an IDE..... a text editor is not an IDE".

59

u/twistedmixes Nov 21 '17

No thanks.

11

u/iggybdawg Nov 22 '17

Why do you want to torture yourself?

2

u/Azzk1kr Nov 21 '17

I love vim combined with a certain set of plugins, but certainly not for Java.

1

u/[deleted] Nov 21 '17

The latest version of neovim and vim support job-control, we can run extra command asynchronously and add call_back_func for the stdout and stderr.

10

u/nuqjatlh Nov 21 '17

lol. good luck with that.

5

u/[deleted] Nov 22 '17

How bout no, Scott

2

u/RedShift9 Nov 25 '17

I don't know what kind of fetish this is but I'm interested.

2

u/Cajova_Houba Nov 22 '17

Excuse me, do you have time to talk about our lord and savior, vim?

1

u/[deleted] Nov 29 '17

Top kek

0

u/[deleted] Nov 21 '17

[deleted]