by fusiongyro · 9y ago · 0 comments
- navigating around the code: jump to interface, jump to implementations, jump to definition, etc. This sucks in Emacs even using etags.
- refactoring: highlight code, press a hotkey, now it's a function or a variable and all repeats have been replaced with references to it
Seeing a choice between Emacs and IntelliJ for Go, the decision comes down to how likely am I to use those two features. I don't do much Go, but the appeal of having that functionality is pretty significant. I would definitely try Gogland based on my experience with Java et al.
Emacs doesn't implement navigating and refactoring go code in elisp, as it does for other languages. For go, there are editor-independent tools, like go-guru, which are used not only by Emacs, but also for vi, vscode and multitude of others. Or just from command line. I would consider golang to be the last language, that needs an Idea-based IDE.
Being able to navigate the code (and refactor it, really) in the same place you are viewing it is a big win for me. At least in the other languages I care about.
Yes (or at least, go-mode in total does): C-c C-j to go to a definition (annoyingly, not the stand M-. every single other language mode uses, why go-mode why), M-, to return up &c. Also, with projectile, searching an entire project (not just source) for strings & regexps is incredibly easy.
I'm not 100% certain, but there's a strong possibility that emacs invented code navigation.
This shows you how: https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15...
https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15...
UPD: Now, if only there was something similar (in Emacs) for Java, Ruby and JS...
not a trivial thing to implement for Go though. Last time I checked the Go plugin for Intellij was missing this functionality