Emacs move around split windows in a specified direction?

后端 未结 7 1095
陌清茗
陌清茗 2020-12-17 10:38

In Terminal Emacs (no mouse), I\'m using split windows to work with multiple buffers at the same time. I\'m finding moving between the split windows much more painful than h

7条回答
  •  青春惊慌失措
    2020-12-17 10:52

    I use the following to navigate to the next (same as C-x o), previous, first, and last window:

    (defun my-previous-window ()
      "Previous window"
      (interactive)
      (other-window -1))
    (global-set-key "\C-xp" 'my-previous-window)
    
    (global-set-key "\C-xn" 'other-window)
    
    (defun my-select-first-window ()
      (interactive)
      (select-window (frame-first-window)))
    
    (defun my-select-last-window ()
      (interactive)
      (select-window (previous-window (frame-first-window))))
    
    (global-set-key "\C-x<" 'my-select-first-window)
    (global-set-key "\C-x>" 'my-select-last-window)
    

提交回复
热议问题