all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Easier Window Switching in Emacs
@ 2008-04-27 23:26 deech
  2008-04-27 23:42 ` Joost Kremers
  2008-04-30  0:37 ` Ivan Kanis
  0 siblings, 2 replies; 3+ messages in thread
From: deech @ 2008-04-27 23:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
Has anyone else noticed that window switching in emacs is a
bit cumbersome?

About a month ago I created a new prefix key C-t and bound
h,j,k,l to move to the left, top, bottom, and right window
respectively. Here is the snippet in my .emacs file that makes this
happen. Please note that this destroys C-t which is by default bound
to transpose-char. If you use this a lot try another prefix key.

;;Make window switching a little easier. C-x-o is a pain.
;;Unbind C-t. I don't really care about transposing chars.
(global-unset-key "\C-t")
;; Turn C-t into a prefix key
(define-prefix-command 'ctrl-t-prefix)
;; And within C-t bind vi-style navigation shortcuts
;; to window switching
(define-key 'ctrl-t-prefix "j" 'windmove-down)
(define-key 'ctrl-t-prefix "k" 'windmove-up)
(define-key 'ctrl-t-prefix "h" 'windmove-left)
(define-key 'ctrl-t-prefix "l" 'windmove-right)
(global-set-key "\C-t" 'ctrl-t-prefix)

Deech


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-30  0:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 23:26 Easier Window Switching in Emacs deech
2008-04-27 23:42 ` Joost Kremers
2008-04-30  0:37 ` Ivan Kanis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.