How to make Emacs always open .c files in the left windows while .h in the right?
Question
I always open three windows when writing C code like this:
|
| 2
1 |_____
|
| 3
|
Window 1 is used for code writing, window 2 is used for cscope, and window 3 is used for header file quick reference.
When I press in cscope window to show source, I want Emacs to display .c files always in window 1 while .h files in window 3, is there any possible solution?
Many thanks for your reply.
Solution
Take a look at the answer to a similar question. The key is to use the variable: special-display-regexps
. It's nearly a drop-in solution, only you choose the window based on the extension (as opposed to not choosing a window).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow