3 ms·
> Vim; modal editing and vi-like navigation can blow open your mind. Explore the existing plugins to accomplish everything you want to be able to do. It's all t
by alasdair_ 6y ago
> Vim; modal editing and vi-like navigation can blow open your mind. Explore the existing plugins to accomplish everything you want to be able to do. It's all there.
The reason I end up ditching Vim after a few weeks every time I try it (4 serious attempts now) and go back to IntelliJ (which I’ve used for two decades) is that I never found a solution to the following trivial issue:
Imagine you have a large Java codebase and you want to refactor all occurrences of a method called “doFoo()” to give it a better name - how do you do this in Vim?
This is a single keypress in IntelliJ and I use this function very frequently but I never found a way to do it in Vim.
Note: I only want to change THIS doFoo() method, not the hundred other doFoo() methods in the codebase.
Also note: yea, this includes all implementations of the interface, all abstract classes, all classes that extend a a class that implements the interface and all other funky polymorphic things, and NO unrelated code. And do it all in one keypress, don’t have me manually go through line by line.
Any ideas if this is possible now?
- positr0n 6y agoI am about as hardcore a vim user as they get and I would never edit Java without an IDE. That being said the first thing I do after installing IntelliJ is open the plugin settings and install IdeaVim.
- srazzaque 6y agoIm the same, s/vim/emacs/, though I'm also very comfortable in Vim. I use Emacs for a tonne of stuff, and basically any other language I use. But for Java, with its deeply hierarchical codebases and general verbosity, there's just no sane way to manage that complexity smoothly without a good IDE. (One could argue that if a language necessitates an IDE to work with it, then that's a failure of the language's DX. But thats an entirely separate discussion.)
- mxschumacher 6y agoYou don't need to choose between Intellj and Vim, because you can use Vim keybindings within Intellj. So you get all the powerful IDE commands and the high speed of Vim commands at the same time. It's easy to set up !
- igneo676 6y agoIf you keep up with the LSP space, this is now possible with Vim https://github.com/eclipse/eclipse.jdt.ls https://github.com/eclipse/eclipse.jdt.ls https://github.com/georgewfraser/java-language-server https://github.com/georgewfraser/java-language-server Are both good examples. You'll need a corresponding client like this one https://github.com/prabirshrestha/vim-lsp https://github.com/prabirshrestha/vim-lsp There are others, but this one is pretty good. Next release of Neovim will have one built into the editor. Frankly, it's a bit of a hassle but once you get an LSP provider set up you can get one for just about any language you're using