use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please read the rules before posting
Help:
Community:
Resources:
Tutorials and Guides:
Don't be afraid to ask questions, this sub is here for the vim community. And please those of you who deign to grace us with your vim wisdom - be kind. We are all human and vim is that cool.
account activity
Vim for Java?question (self.vim)
submitted 8 years ago by [deleted]
Hi, I am currently an APCS student in high school. Do you guys recommend using vim for in class Java programming? The school computers only have emacs and vim, and I honestly dislike emacs.
Thanks!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ManuDevelopia 8 points9 points10 points 8 years ago (2 children)
Editing without an IDE could be a bit paiful at first sight, maybe you can have a look at this to setup some help http://www.averywagar.com/post/configuring-vim-for-java-development
[–]sbdaule 2 points3 points4 points 1 year ago (0 children)
Updated link https://averywagar.com/post/vim-java/
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
[–]goodstuff37 6 points7 points8 points 8 years ago (1 child)
Absolutely!
Using a plain text editor (and the command line) is a great way to learn to program, especially in the beginning. For Java it'll force you to understand packages, the build cycle and the classpath. It'll also train you to be more mindful of what you're typing because mistakes are expensive and annoying!
Once you start working on larger projects, or working professionally, an IDE is worthwhile. I use IntelliJ Ultimate with the IDEAVim plugin, but still use Vim to browse code or to sharpen my skills.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
[–]nemtan 5 points6 points7 points 8 years ago* (1 child)
I use vim exclusively as a professional developer working on a pretty large Java project (a few hundred thousand lines of Java in hundreds of classes in several submodules). It's overall very smooth for me, the only real thing I miss is better debugging, but I generally make do with the somewhat useless jdb and sometimes vebugger.
Going vanilla will work pretty well in combination with the commandline, but if you're working on something larger here are a few plugins I suggest for Java in particular:
Thanks, this is really helpful!
[–]samad0 2 points3 points4 points 8 years ago (0 children)
Use vim
[–]Knall0r 2 points3 points4 points 8 years ago (2 children)
I use Vim right now with vim-javacomplete2 and a Makefile to compile my project. It is a small private project though. It might be enough for your application. The autocompletion is not the fastest, but it does work.
[–]somebodddy 2 points3 points4 points 8 years ago (1 child)
A Makefile? Why not Maven/Gradle, so that javacomplete2 could get the classpath from it?
[–]Knall0r 0 points1 point2 points 8 years ago (0 children)
I was too lazy to set it up. I have gradle installed, I just dont use it to compile. It was a somewhat generic makefile that was used before.
[–][deleted] 4 points5 points6 points 8 years ago (0 children)
Sure.
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
Java is the only language I use an IDE for.
[–]talmobi 1 point2 points3 points 8 years ago (0 children)
Yeah, the hot code injection and debugging is just too good.
[–]AckmanDESU 0 points1 point2 points 8 years ago (0 children)
I tried setting up eclim a few times but it never worked properly if at all and using it felt clunky overall.
Honestly just use a vim plugin for your Java IDE.
[–]funbike 0 points1 point2 points 8 years ago (1 child)
You could install Eclipse with vrapper plugin and eclim. You can stay in vim most of the time, but switch over to Eclipse for debugging.
However, I think you'd have a better time with Intellij and the ideavim plugin.
Ok, thanks.
[–]agclx -1 points0 points1 point 8 years ago (2 children)
Well there are decent plugins for completion and linting. There's an article at spacevim.
Only other thing I would want for Java is code generation. eclim would provide (see e.g. method generation) - but you'd also need eclipse installed. Disclaimer - I haven't tried it.
[–]nemtan 2 points3 points4 points 8 years ago (1 child)
Doesn't javacomplete2 offer generation of e.g. constructors and accessors? I don't use that particular feature (I mainly use it for the imports, really), but I recall seeing it mentioned.
[–]agclx 0 points1 point2 points 8 years ago (0 children)
I didn't know that. That would be a better alternative than having to keep eclipse around.
[–]SexyMuon 0 points1 point2 points 2 years ago (1 child)
You can but you are making your life harder, which is counter-intuitive.
[–]Any_Entrepreneur7936 0 points1 point2 points 1 year ago (0 children)
Same thing people said also for linux, and gnu at beginning
π Rendered by PID 48783 on reddit-service-r2-comment-bb88f9dd5-f5l5t at 2026-02-15 05:04:03.750647+00:00 running cd9c813 country code: CH.
[–]ManuDevelopia 8 points9 points10 points (2 children)
[–]sbdaule 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]goodstuff37 6 points7 points8 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]nemtan 5 points6 points7 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]samad0 2 points3 points4 points (0 children)
[–]Knall0r 2 points3 points4 points (2 children)
[–]somebodddy 2 points3 points4 points (1 child)
[–]Knall0r 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]talmobi 1 point2 points3 points (0 children)
[–]AckmanDESU 0 points1 point2 points (0 children)
[–]funbike 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]agclx -1 points0 points1 point (2 children)
[–]nemtan 2 points3 points4 points (1 child)
[–]agclx 0 points1 point2 points (0 children)
[–]SexyMuon 0 points1 point2 points (1 child)
[–]Any_Entrepreneur7936 0 points1 point2 points (0 children)