I've been working in a new codebase recently, and I've been struggling to navigate code. I don't think this code is organized particularly poorly, but I still find myself jumping around and having quite a few files/tabs open trying to follow the thread. In this case some of this code is object oriented and so there's lots of jumping between class and base classes (often multiple base classes deep...) to see where anything happens. I've used VIM marks in the past, I'm trying a bookmarking extension for VS Code, and sometimes I open multiple files in splits to keep things "in context", but I still feel like these are all less than ideal and it's very easy if I step away from my computer for a few minutes for it all to leak out of my brain and then I spend the next 30 minutes trying to get it all back before I can work on the problem.
Looking for any tips you all might have for making this easier.
F12: Go to definition
Shift+F12: Go to usages
Ctrl+-: Go back
Ctrl+Shift+-: Go forward
Once you get used to it, it's as easy as browsing the web.
Since I started using VSCode I did not have to work with codebases that were complex enough to make these features valuable but some VSCode language extensions support tree views of call hierarchies and type hierarchies. Here's the documentation for the Java extension.
https://code.visualstudio.com/docs/java/java-editing#_call-h...
https://code.visualstudio.com/docs/java/java-editing#_type-h...
You can set keybindings for them too.