all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: split buffers
       [not found] <i27ovc$ah0$1@news.eternal-september.org>
@ 2010-07-22  1:21 ` TheFlyingDutchman
  2010-07-22  1:53   ` TheFlyingDutchman
       [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
  2010-07-22 15:18 ` jpkotta
  1 sibling, 2 replies; 7+ messages in thread
From: TheFlyingDutchman @ 2010-07-22  1:21 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 21, 2:31 pm, Peter Keller <psil...@cs.wisc.edu> wrote:
> Hello,
>
> I'm new to emacs, but have been using it for a while to write Lisp.
>
> My question is:
>
> In vim, one can have a tab that is split. When one moves from that tab
> to another, both portions of the split tab are replaced by the whole
> of the next tab (which in and of itself could be split 0-N times).
>
> In emacs, if I split the buffer with C-x 2, I can only change the
> exact buffer I'm in with C-x C-<right arrow> and such.
>
> Is there a way to mimic the split tab behavior in vim with emacs buffers?
>
> Thank you.
>
> -pete

If I understand correctly, you need to use frames. You can create new
frames from the menu (Menu-Bar->File->New Frame) or "C-x 5 2". Then
you can split those frames into multiple windows. To move between
frames you use (Menu-Bar->Buffers->Frames-><frame to switch to>).
There is likely a way to move between frames with the keyboard (or
create the capability) but I don't know what it is.


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

* Re: split buffers
  2010-07-22  1:21 ` split buffers TheFlyingDutchman
@ 2010-07-22  1:53   ` TheFlyingDutchman
       [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
  1 sibling, 0 replies; 7+ messages in thread
From: TheFlyingDutchman @ 2010-07-22  1:53 UTC (permalink / raw)
  To: help-gnu-emacs


> There is likely a way to move between frames with the keyboard (or
> create the capability) but I don't know what it is.- Hide quoted text -
>

It looks like the command other-frame moves to the next frame. It is
bound to "Control-x 5 o" which is pretty cumbersome. You can bind it
to another key or key-combination in your .emacs file, e.g.:

; use F8 key to switch to the next frame
(global-set-key (kbd "<f8>") 'other-frame)



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

* Re: split buffers
       [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
@ 2010-07-22  4:25     ` AmosBurke
  2010-07-22  4:29     ` TheFlyingDutchman
  2010-07-22  6:28     ` Andreas Politz
  2 siblings, 0 replies; 7+ messages in thread
From: AmosBurke @ 2010-07-22  4:25 UTC (permalink / raw)
  To: help-gnu-emacs


>
> I'm happy doing vulcan deathgrip chords in order to change just
> the buffer in a frame, versus the whole frame full of buffers to
> another frame with different buffers, but I need it all to exist in
> one physical window.
>

There are two commands which seem to  save and restore buffer/window-
configurations in a frame that might suffice for what you want:

window-configuration-to-register  (bound to Control-x r w)  to save
it

and

jump-to-register (bound to Control-x r j)

So if you get a particular buffer/window-configuration set up you can
save it with c-x r w  (you have to then type a number for a specific
register e.g. 1, when prompted)
Then you can set up another buffer/window-configuration and save that
with c-x r w (giving a different register number when prompted)

Then you restore them at any time with c-x r j (and register number
desired at the prompt)

You can simplify the keystroke combinations and typing by adding
something like this to your .emacs file:

(defun SaveWinConfigToRegister1 ()
"save window configuration to register 1"
  (interactive)
  (window-configuration-to-register 1)
)

(defun RestoreRegister1 ()
"restore configuration from register 1"
  (interactive)
  (jump-to-register 1)
)

(defun SaveWinConfigToRegister2 ()
"save window configuration to register 2"
  (interactive)
  (window-configuration-to-register 2)
)

(defun RestoreRegister2 ()
"restore configuration from register 2"
  (interactive)
  (jump-to-register 2)
)


(defun SaveWinConfigToRegister3 ()
"save window configuration to register 3"
  (interactive)
  (window-configuration-to-register 3)
)

(defun RestoreRegister3 ()
"restore configuration from register 3"
  (interactive)
  (jump-to-register 3)
)

; <CTRL-F1> to save window configuation to register 1
(global-set-key (kbd "<C-f1>") 'SaveWinConfigToRegister1)
; <ALT-F1> to restore window configuration saved in register 1
(global-set-key (kbd "<M-f1>") 'RestoreRegister1)
; <CTRL-F1> to save window configuation to register 2
(global-set-key (kbd "<C-f2>") 'SaveWinConfigToRegister2)
; <ALT-F1> to restore window configuration saved in register 2
(global-set-key (kbd "<M-f2>") 'RestoreRegister2)
(global-set-key (kbd "<C-f3>") 'SaveWinConfigToRegister3)
(global-set-key (kbd "<M-f3>") 'RestoreRegister3)




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

* Re: split buffers
       [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
  2010-07-22  4:25     ` AmosBurke
@ 2010-07-22  4:29     ` TheFlyingDutchman
  2010-07-22  5:21       ` Peter Keller
  2010-07-22  6:28     ` Andreas Politz
  2 siblings, 1 reply; 7+ messages in thread
From: TheFlyingDutchman @ 2010-07-22  4:29 UTC (permalink / raw)
  To: help-gnu-emacs

There are two commands which seem to  save and restore buffer/window-
configurations in a frame that might suffice for what you want:

window-configuration-to-register
     (bound to Control-x r w)  to save it

and

jump-to-register
       (bound to Control-x r j)

So if you get a particular buffer/window-configuration set up you can
save it with c-x r w
    (you have to then type a number for a specific
       register e.g. 1, when prompted)

Then you can set up another buffer/window-configuration and save that
with c-x r w
      (giving a different register number when prompted)

Then you restore them at any time with c-x r j
   (and register number desired at the prompt)

You can simplify the keystroke combinations and typing by adding
something like this to your .emacs file:

(defun SaveWinConfigToRegister1 ()
"save window configuration to register 1"
  (interactive)
  (window-configuration-to-register 1)
)

(defun RestoreRegister1 ()
"restore configuration from register 1"
  (interactive)
  (jump-to-register 1)
)

(defun SaveWinConfigToRegister2 ()
"save window configuration to register 2"
  (interactive)
  (window-configuration-to-register 2)
)

(defun RestoreRegister2 ()
"restore configuration from register 2"
  (interactive)
  (jump-to-register 2)
)

(defun SaveWinConfigToRegister3 ()
"save window configuration to register 3"
  (interactive)
  (window-configuration-to-register 3)
)

(defun RestoreRegister3 ()
"restore configuration from register 3"
  (interactive)
  (jump-to-register 3)
)

; <CTRL-F1> to save window configuation to register 1
(global-set-key (kbd "<C-f1>") 'SaveWinConfigToRegister1)
; <ALT-F1> to restore window configuration saved in register 1
(global-set-key (kbd "<M-f1>") 'RestoreRegister1)
; <CTRL-F1> to save window configuation to register 2
(global-set-key (kbd "<C-f2>") 'SaveWinConfigToRegister2)
; <ALT-F1> to restore window configuration saved in register 2
(global-set-key (kbd "<M-f2>") 'RestoreRegister2)
(global-set-key (kbd "<C-f3>") 'SaveWinConfigToRegister3)
(global-set-key (kbd "<M-f3>") 'RestoreRegister3)


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

* Re: split buffers
  2010-07-22  4:29     ` TheFlyingDutchman
@ 2010-07-22  5:21       ` Peter Keller
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Keller @ 2010-07-22  5:21 UTC (permalink / raw)
  To: help-gnu-emacs

TheFlyingDutchman <zzbbaadd@aol.com> wrote:
> There are two commands which seem to  save and restore buffer/window-
> configurations in a frame that might suffice for what you want:
> 
> window-configuration-to-register
>     (bound to Control-x r w)  to save it
> 
> and
> 
> jump-to-register
>       (bound to Control-x r j)

Now THIS does much more of what I expect!

I'm going to read up on it for a little while and see if I can't
improve the usability of it some more. It definitely now looks like
I can mimic vim's tabbing and splitting behavior.

Thank you!

-pete


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

* Re: split buffers
       [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
  2010-07-22  4:25     ` AmosBurke
  2010-07-22  4:29     ` TheFlyingDutchman
@ 2010-07-22  6:28     ` Andreas Politz
  2 siblings, 0 replies; 7+ messages in thread
From: Andreas Politz @ 2010-07-22  6:28 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Keller <psilord@cs.wisc.edu> writes:

>
> I'm happy doing vulcan deathgrip chords in order to change just
> the buffer in a frame [...]

Non-vulcans usually do it with `C-x b'. Some humans even use a mode like
`ido-mode'.

-ap


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

* Re: split buffers
       [not found] <i27ovc$ah0$1@news.eternal-september.org>
  2010-07-22  1:21 ` split buffers TheFlyingDutchman
@ 2010-07-22 15:18 ` jpkotta
  1 sibling, 0 replies; 7+ messages in thread
From: jpkotta @ 2010-07-22 15:18 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 21, 4:31 pm, Peter Keller <psil...@cs.wisc.edu> wrote:
> Hello,
>
> I'm new to emacs, but have been using it for a while to write Lisp.
>
> My question is:
>
> In vim, one can have a tab that is split. When one moves from that tab
> to another, both portions of the split tab are replaced by the whole
> of the next tab (which in and of itself could be split 0-N times).
>
> In emacs, if I split the buffer with C-x 2, I can only change the
> exact buffer I'm in with C-x C-<right arrow> and such.
>
> Is there a way to mimic the split tab behavior in vim with emacs buffers?
>
> Thank you.
>
> -pete

If I understand you correctly, you want something like elscreen, which
maintains a set of window configurations and (I think) has tabs that
let you switch between them.  See the Emacs Wiki for this and other
similar packages.

http://www.emacswiki.org/emacs/CategoryWindows#toc4


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

end of thread, other threads:[~2010-07-22 15:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <i27ovc$ah0$1@news.eternal-september.org>
2010-07-22  1:21 ` split buffers TheFlyingDutchman
2010-07-22  1:53   ` TheFlyingDutchman
     [not found]   ` <i28a6t$e06$1@news.eternal-september.org>
2010-07-22  4:25     ` AmosBurke
2010-07-22  4:29     ` TheFlyingDutchman
2010-07-22  5:21       ` Peter Keller
2010-07-22  6:28     ` Andreas Politz
2010-07-22 15:18 ` jpkotta

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.