4 ms·
Refactoring is indeed a problem. I try to use an IDE for that (for java I don't use vim anymore; it's complete overkill). If you use python or go, you can find
by farresito 10y ago
Refactoring is indeed a problem. I try to use an IDE for that (for java I don't use vim anymore; it's complete overkill). If you use python or go, you can find some stuff out there, but sadly vim is not made for this.
I've never really had a problem with goto method definition with ctags, and I've used that with multiple languages. ctags is usually relatively fast generating the tags, and you could probably set up so that it generates it each X seconds if you wanted.
For the project wide search, ctrlP has served me well, although the fuzzy completion is far from good (command-t is way better at that), so I would probably recommend the second one if your project is large.
Regarding switching projects, I've been using tmux for quite some time and it's a blessing. I could not imagine someone spending a lot of time in the terminal with vim and not using tmux or another terminal multiplexer. tmux is for me as important as vim itself. It makes a big difference. I have different sessions for different projects .
You have probably heard about youcompleteme. It's not amazing (doesn't come close to intellij), but it works and it's free, so the last thing I will do is complain :)
I'm not sure I understand the move back/forward in history. Do you mean undoing just some specific selected code?
vim is far from perfect. The more I use other tools, the more I realize it's limited in a lot of ways, but unfortunately when I try to use other editors, I find too many shortcomings too, so right now for me vim is the best I have =)
- tedmiston 10y agoThanks, this is really helpful. Regarding jumping back/forward, I didn't describe it super well. Here's the official description [1]: > Jump Back and Jump Forward - Jump Back allows you to go to previous editing positions. This goes hand in hand with Goto Definition: you can now inspect a symbol definition, and quickly jump back to where you were previously. Jump Back is bound to ^Minus by default. [1]: https://www.sublimetext.com/blog/articles/sublime-text-3-beta-3019 https://www.sublimetext.com/blog/articles/sublime-text-3-bet...
- farresito 10y agoOh! Yes! There are two ways to do that: c-t: will bring you back to the previous location before jumping. this is the right way to do it if you jumped from another file by tag c-o: if you run commands like gg to go to the top of the file, c-o also tracks this as a previous location. useful to know if you need to check something at the top of the file and you want to go back to where you were before pressing gg. also tracks tags, but of course if you jump to a tag, then gg, then press c-o it will bring you back to the position before pressing gg instead of the file you jumped from for the tag (more often than not im a victim of using c-o with tags)