So, I have 2 files:
tictactoe.h. You can see the image for these two files below in Emacs. I have them stacked horizontally and also have
tabbar to show the name of the files
helm installed and setup
gtags to work.
I also mapped
helm-gtag-dwim to a shortcut
Everthing works: whenever I am near a function call in my main
tictactoe.cpp file, I can just do
M-n and it would search for the definition and bring up the
tictactoe.h file, with the relevant function highlighted.
However, my current window will get overwritten. For example, in current picture,
tictactoe.cpp is on top, and
tictactoe.h is at the bottom
tictactoe.cpp if I do
instruction();, that top window will turn into
tictactoe.h and highlight where the definition for
In other words, I would lose the focus of my main code
tictactoe.cpp and instead get 2 instances of
tictactoe.h stacked on top of each other.
What I want: keep the main
tictactoe.cpp or the top window stay in focused. Then, whenever I do
helm-gtag-dwim, the cursor should jump to the bottom window,
helm then does its thing and highlight the relevant function call in the bottom window.
How can I achieve this for horizontal split as well as vertical split?