![]() ![]() This is how the test feedback loop looks like: I’m currently working on a solution (based on this forum entry) for having Gradle and the QuickFix window to play together nicely. Still, I’m able to display the compilation/test errors in the QuickFix window. This functionality is based on the assumption that the compiler output is properly parsed, which is not the case for Gradle. There is one gotcha: the QuickFix window is supposed to show compilation errors that you can “navigate” using or and even jump to the file reported in the errors list. When pressing, Vim saves the current file, run the Gradle compilation and open the QuickFix window if there are compilation errors or test do not pass. The installation page for Eclim is quite comprehensive. I consider IntelliJ a superior platform but I still use Eclipse with the Geppetto plugin to edit Puppet files. The only drawback is that you need to install Eclipse. Eclim documentation is excellent and the bundle integrates well with other plugins, like supertab (more on supertab later). Additionally, I considered the setup a bit too complex.Įventually, I decided to try out Eclim and have been very satisfied with the Vim integration. I knew of the existence of Eclim but I kind feel like cheating to resort to an headless Eclipse for my auto completion needs. On my quest for the perfect Java/Vim setup, I started using Javacomplete which never really worked as well as any IDE in terms of auto completion. Vim basic auto completion for Java is an essential feature for working with third-part libraries and large code bases. This StackOverflow answer clearly shows the settings to enable indentation guide and remove tabs before saving a file. Please note that Vim natively supports visual guides for tab-indented blocks. In order for syntax highlighting to work, add MacVim comes with a truckload of syntax highlighting files, including Java and Groovy. If you are on a Mac you should use MacVim and you should install it using Homebrew. If you don’t, I highly recommend you do (or look into other bundle managers, like Vundle). I assume you use Pathogen for managing your VIM plugins. This setup has been tested on OSX 10.8 and MacVim. (As a side note, James Gosling famously stated that you’d better use an IDE if you want to code in Java.) ![]() Your mileage may vary, but I encourage you to take a spin. I have never felt very comfortable working inside one of the heavyweight IDEs and my productivity is just higher when I work with my VIM setup. I’m not going to try to convince you that Vim is better than your favorite Java IDE, especially if you have never used Vim before. Refactoring it’s probably the only functionality that is hard to achieve, even if it’s not an impossible goal ( Eclim partially supports that). ![]() How will you do without auto-completion? How do you navigate files? How do you refactor? How do you jump to a function definition? It turns out that you can do most of that stuff in VIM. There are lots of folks who run away screaming when you try to suggest they abandon one of the mainstream IDEs (Eclipse, IntelliJ, Netbeans) and move to Vim. In this post, I’m presenting my current Vim configuration for working with Java and Groovy projects. However, with enough perseverance, the VIM’s approach to manipulating text becomes natural and you will not look back (enough with the Vim advocating, there are countless blog posts discussing the marvels of Vim). It’s not an easy journey: Vim requires dedication and it’s sheer amount of options and plugins can be intimidating for a newcomer. During the last couple of years, I gradually moved to Vim for editing text and writing code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |