开发者

couple windows/buffers together in emacs?

开发者 https://www.devze.com 2022-12-21 07:32 出处:网络
I often have multiple processes running (R, Python, eshell/shell), and for each I often have an associated script from which I send snippets. For this purpose I usually split each frame into two windo

I often have multiple processes running (R, Python, eshell/shell), and for each I often have an associated script from which I send snippets. For this purpose I usually split each frame into two windows vertically so that my script file (e.g., .py) is in the top window and the REPL or interactive program is in the lower window (e.g., Python). Is there a simple way to link the two such that switching and closing buffers will operate on the two buffers together? I do have winner-mode and elscreen - but after switching buffers in one window, I try to use it to return to a previous state in which I had the original script-process buffers together in the same frame and split into windows, and I often get a mixing of buffers so that the "correct" script buffer does not appear together with its process buffer in the two windows. Sorry if this is a bit confusing but perhaps one solution is to make C-x b (iswitch buffers or ido-switch buffers) 开发者_StackOverflow中文版aware of the other buffer running in the frame (but different window)? Any help appreciated. Thanks -


You could store the window configuration in a register (C-x r w <key>, e.g. C-x r w w), one for each window configuration, and then instead of switching buffers, just jump to the window configuration you have stored (C-x r j <key>, e.g. C-x r j w).

So for example, when you have the windows laid out for R like you like them, hit C-x r w r. Then when you want to switch back to R, just hit C-x r j r.

0

精彩评论

暂无评论...
验证码 换一张
取 消