tags:

views:

913

answers:

2

In Emacs, C-x o takes me to the next window.

What keyboard macro takes me to the previous window in Emacs?

+8  A: 

That'd be C-- C-x o

In other words, C-x o with an argument of -1. You can specify how many windows to move by inserting a numeric argument between C-u and the command, as in C-u 2 C-x o. (C-- is a shortcut for C-u - 1)

JB
+4  A: 

You might also want to try using windmove which lets you navigate to the window of your choice based on geometry. I have the following in my .emacs file to change windows using C-x arrow-key.

(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
Nathan
Great idea - just love it!
Gerald Senarclens de Grancy