Emacs other-window backwards

I am currently writing a lot of text in Emacs, and I need to work on multiple files in parallel. So I use the split window functionality a lot. With C-x o you can switch to the next split window. However, it would be nice to go backward as well. The solution is simple, and is given on Stackoverflow and some other blogs:

(defun prev-window ()
  (other-window -1))
(global-set-key (kbd "C-x p") 'prev-window)

Just put this in you init.el, and you can cycle backwards using C-x p.

No comments:

Post a Comment