help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to toggle to buffer previously selected ?


From: Thierry Volpiatto
Subject: Re: How to toggle to buffer previously selected ?
Date: Thu, 07 Feb 2008 17:18:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Francis Moreau" <francis.moro@gmail.com> writes:

> On Feb 7, 2008 11:53 AM, Tassilo Horn <tassilo@member.fsf.org> wrote:
>> "Francis Moreau" <francis.moro@gmail.com> writes:
>>
>> Hi Francis,
>>
>> > I know 'C-x o' to select the next selected buffer but I'd like to
>> > toggle between 2 buffers even if more than 2 buffers are displayed.
>>
>> I use this:
>>
>> (defun th-other-buffer ()
>>   (interactive)
>>   (switch-to-buffer (other-buffer)))
>>
>> (global-set-key (kbd "C-?") 'th-other-buffer)
>>
>
> This is not what I want to do. Sorry I wasn't clear enough in my previous 
> email.
>
> OK, let's say I have the following setup in my emacs:
>
> +-------+--------+
> |           |           |
> |   1      |   2      |
> |           |           |
> +-------+--------+
> |           |           |
> |   3      |   4      |
> |           |           |
> +-------+--------+
>
> Currently buffer "2" is selected.
>
> I now select buffer "3". I did some typing in that buffer now I want
> to get back quickly to buffer "2". I don't want to do "\C-x\C-o" but
> I'd like for example just to do "\C-TAB".
>
> So I can go back and forth between these 2 buffers just by typing "\C-TAB"
>
> Thanks

;; C-x o inversé de n windows(optional)
(defun other-window-backward (&optional n)
  "retourne sur n window(s) precedent(s)"
  (interactive "p")
  (other-window (- (or n 1))))
(global-set-key (kbd "<C-tab>") 'other-window-backward)

To go back 1 window C-tab 
2 windows C-u 2 C-tab ...etc...
-- 
A + Thierry
Pub key: http://pgp.mit.edu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]