all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make "C-x 4" command work better for widescreen monitor
Date: Tue, 28 Oct 2008 15:37:14 -0700 (PDT)	[thread overview]
Message-ID: <1dd4bd66-7907-4913-a088-292cd5778741@n1g2000prb.googlegroups.com> (raw)
In-Reply-To: 8a26fb47-c638-4d77-a493-61826a959d8e@b31g2000prb.googlegroups.com

On Oct 28, 11:59 am, Pony <lingyu.ma...@googlemail.com> wrote:
> When we run the command "C-x 4 f", which will open a new file in a new
> buffer under the current one,
> the Emacs will cut the whole window into two vertical ones, each takes
> 50% space of the screen.
>
> However at present more and more people begin to use widescreen tft
> monitor for programming,
> in my opinion it will be much better that, after we run "C-x 4"
> commands the Emacs cut the whole screen into two HORIZONTALL screens.
>
> Of course, people could open a new file first with "C-x 4 f" command,
> and close it, and run "C-x 3" command to cut the whole screen
> horizontally and show it in the second window. But it takes some
> operations, which will be happened frequently when programming.
>
> Is there a fast and direct way to make all the "C-x 4" commands
> default cut the window HORIZONTALLY, or not?
> Especially when you're compiling, make the compiling result show in
> the window right to the code window!!
>
> Hope for your answers.

I'm not sure there is a easy customization for this. I checked source
for find-file-other-window, which leads to switch-to-buffer-other-
window, which leads to display-buffer. I think it is with display-
buffer where you set how you want the windows split.

However, you could easily write a function that does what you want by
calling split-window-horizontally. (let us know if you really just
want this)

i actually never use find-file-other-window (Ctrl+x 4 f).
I find it easier just to split the win yourself then open any buffer
you want. This gives you much control and useful in many situations.
All you need is some fast shortcuts.

Basically, you want a fast key to split window, to split window, and
one to switch cursor among the window.

On the qwerty layout, i have them as:

Alt+2 ⇒ split window top/bottom
Alt+Shift+2 ⇒ split window side by side

Alt+1 ⇒ unsplit window
Alt+Shift+1 ⇒ unsplit by removing current pane

Alt+s ⇒ move cursor to other pane other-window

these will get you a long way.

if you like them, you can find the implementation and other setup
here:
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html

  Xah
∑ http://xahlee.org/

  reply	other threads:[~2008-10-28 22:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 18:59 How to make "C-x 4" command work better for widescreen monitor Pony
2008-10-28 22:37 ` Xah [this message]
2008-10-29  7:28 ` Aliaksey Kandratsenka
2008-10-29 15:49 ` Giorgos Keramidas
2008-10-29 17:32 ` Rupert Swarbrick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1dd4bd66-7907-4913-a088-292cd5778741@n1g2000prb.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.