[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: switch to previous buffer
From: |
Chris F.A. Johnson |
Subject: |
Re: switch to previous buffer |
Date: |
Fri, 29 Mar 2013 18:58:50 -0400 |
User-agent: |
slrn/0.9.8.1 (Linux) |
On 2013-03-29, Rami A wrote:
> Usually I switch between buffers going through the "buffer menu".
> So I would be in Buffer 1 -> C-x C-b "bufer menu" -> buffer 2
>
> I have the short cut:
> (global-set-key "\M-a" 'switch-to-previous-buffer)
>
> So I could switch back to the previous buffer.
> How is possible to skip the buffer menu when doing so.
>
> Basically,
> Buffer 1 -> C-x C-b "bufer menu" -> buffer 2 -> M-a -> buffer 1 "without
> going back to buffer menu"
I use:
(global-set-key [(control backspace)] 'last-buffer)
(defun last-buffer ()
"Switch to previous buffer"
(interactive)
(switch-to-buffer ())
)
--
Chris F.A. Johnson <http://cfajohnson.com>
Author: =======================
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)