2013-02-08 137 views
1

我用C-x 3分割左右窗口。光标位于左侧窗口中,我可以使用C-n,C-p移动光标。我怎样才能留在左边的窗口并上下移动代码?在Emacs拆分窗口中,如何浏览其他窗口?

我已经完成了这个,但我失去了所有的emacs文件。所以我现在无法弄清楚。谢谢。

+1

如果您还没有建立好备份系统,我建议在您的emacs配置(例如github)的某处设置远程存储库,并确保您保持最新状态。 – phils

回答

3

我GOOGLE了答案,Re: How to scroll other window backwards? C-M-v does forwards

尽管如此,使用scroll-other-window功能和参数添加到它。以下是详细信息:

(defun scroll-other-window-up-line() 
    "Scroll the other window one line up." 
    (interactive) 
    (scroll-other-window -1)) 
(defun scroll-other-window-down-line() 
    "Scroll the other window one line down." 
    (interactive) 
    (scroll-other-window 1)) 
(global-set-key (kbd "M-p") 'scroll-other-window-up-line) 
(global-set-key (kbd "M-n") 'scroll-other-window-down-line) 

希望它可以帮助。

+0

谢谢。这是我以前用过的相同的东西。尽管我没有绑定到“M-p”,“M-n”。 – snowgoose

1

scroll-other-window是你的朋友,默认绑定到C-M-v

+0

C-M-v很好,但它移动了一页。在我以前的经验中,我可以逐行浏览,就像当前窗口中的C-n,C-p一样。 – snowgoose

+0

我希望你能够使用这个信息做其他类似的事情。 –