For example, I have the file model/user.py open and I want to have a shortcut that opens controller/user.py. Or I want to switch to test/model/testUser.py (contrived example)
I’d like to make an emacs shortcut which given a file currently open, opens files related in various ways.
If the “related files” follow some kind of pattern, I think it’s trivial to write some elisp functions to do the task. Let’s say you have a model and need to open his associated controller, you will need to do something like this:
Then you can bind the function to, say, F5:
If you want to crate this binding globally, use:
Of course, this is just a crude example(since you didn’t give many specific details), but should be enough to get you started. Hope it helps!