Writing Java with Vim
I came from scripting languages
I have the good fortune to be a software developer. I first learned to program with Scratch (lots of fun!) and after some failed attempts to learn Smalltalk and PHP I finally learned about Python and developed my first game. That's ancient history. In my job I work with many different programming languages and it is rather common for each new project to introduce one or more new languages or frameworks. I had worked with Python, PHP, Javascript, Typescript, Dot (GraphViz), Go, Pearl, Awk, LaTeX, QlikViewScript, and I've always worked with Vim. All these languages didn't really require a 'real' IDE.
And suddenly had to be productive with Java
About a year and a half ago I started a new position. At first I should write automated tests with Javascript and Puppeteer. But as it is usual, things changed. A new project came along and I should work with Java. That was a new world for me. I felt like I would have to write a package.json file within each class file. My boss insisted I used a 'proper' IDE and upon searching the web I found people basically saying that it is impossible or stupid to be a Java developer using Vim (https://stackoverflow.com/questions/1085146/programming-java-with-vim). Of course, there were ways around it, but they were all quite complex and sometimes involved running Eclipse in the background anyway.
I had to deliver my work, so I installed some IDEs and ended up working with IntelliJ and its Vim mode for a year and a half. Even though I ended up destroying some files due to a weird interpretation of Vim macros, it is indeed an awesome tool, I must admit. But for my personal projects I continued using Vim.
Then again, my OS is my IDE
Out of nowhere came COVID-19 and I was suddenly working at home, with my good old computers, all of them about a decade old. None could run Intellij. To be fair, there are some websites nowadays they cannot run. I use a very lightweight desktop these old fellows met all my needs my computing needs quite fine up until then. Now I had to either buy an expensive computer for a temporary need or learn to use Java with Vim.
The good thing is that Vim works very well with any other tool that runs in the terminal, and there are tons of great such tools. For example, I enjoy using Ranger to quickly navigate over the project structure and the awesome Silver Searcher to find what I need to fix, Ctags to jump to declarations, and many others. But my life would have been much harder without Maven.
IntelliJ did a pretty good job of preventing me to learn to use Maven until this February. I knew there was a pom file, but for me it was simply a dependency manager. Learning simple maven commands makes working with Java and Vim almost instantly feasible. I became much more aware of the libraries I was using and got more familiar with their documentation now that it was not being cherry-picked for me.
Initially I used Vim's autocomplete features with the help of Ctags, that did quite a good job out-of-the-box. But I did miss IntelliSense. Up until then I disliked installing Vim plugins. I felt most of them were unnecessary, but the experience with IntelliJ led me to read about the Language Server Protocol and there are a number of Vim plugins that use it. For now I am using the ALE plugin https://github.com/dense-analysis/ale.
After a couple of days my productivity was back on track and I was much more familiar with Maven and Vim. Plus, now I was much more comfortable. My macros work perfectly. I can save sessions and invoke shell commands, and had a little free time to learn something new. I chose to learn some VimScript to help me improve my productivity further.
But it was not a large project
People say one cannot work with a large Java codebase with Vim. I cannot say I can do that. The project I was working on wasn't really large and yesterday it was handed to another team. Now we are working on two projects. One of them is a Go project, a fork of Documize (https://www.documize.com/). It was nice to be able to work with a more Vim friendly language, but the other is a 6-year-old large project written in Java. I hope to be able to say I could handle it with Vim in a couple of months.
Disclaimer
Hey, I'm not saying you should use Vim. I'm using it for almost a decade and that must play a role in my fondness for it. I'm sure there are plenty of spectacular tools out there. I loved working with Gedit, Visual Studio Code, IntelliJ, Sublime, Bluefish and Geanny. But I'll stick with Vim for now.