[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quick cycle
From: |
weber |
Subject: |
Re: Quick cycle |
Date: |
Fri, 11 Apr 2008 05:01:01 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Apr 11, 3:40 am, superheat...@yahoo.ca wrote:
> Hello, I have a quick question.
>
> I have 2 vertical splits, with an additional horizontal split in each
> in one window. Is there a way to quickly switch between them without
> cycling using C-x o for instance, or C-x b and typing the name?
> Perhaps numbering?
>
> Right now I'm using my mouse, but it strikes me as very un-emacs, and
> taking the hand off the keyboard is as much a pain as cycling through
> each until I get to the split I want.
>
> - Edward
This is from jao [1]:
;;;; window navegation
(defun jao-first-window ()
(interactive)
(select-window (frame-first-window)))
(defmacro jao-nth-window (n)
`'(lambda ()
(interactive)
(jao-first-window)
(other-window ,n)))
and then he defines some keys:
(global-set-key (kbd "\C-c1") 'jao-first-window)
(global-set-key (kbd "\C-c2") (jao-nth-window 1))
(global-set-key (kbd "\C-c3") (jao-nth-window 2))
(global-set-key (kbd "\C-c4") (jao-nth-window 3))
does that help you?
original repo is http://hacks-galore.org/darcs?r=emacs;a=summary
Cheers,
Hugo
- Re: Quick cycle,
weber <=