From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Torben Knudsen Newsgroups: gmane.emacs.help Subject: Re: moving around multiple buffers Date: Fri, 21 Aug 2009 07:50:17 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87d46p90me.fsf@es.aau.dk> References: <7f4hieF2ip8t3U1@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1250836859 18758 80.91.229.12 (21 Aug 2009 06:40:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 06:40:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 21 08:40:52 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeNnv-0006dr-LS for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 08:40:51 +0200 Original-Received: from localhost ([127.0.0.1]:58225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeNnv-00037d-2Q for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 02:40:51 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Original-Lines: 79 Original-NNTP-Posting-Host: 192.38.50.63 Original-X-Trace: news.sunsite.dk DXC=JlMG`dQ]TdnNC=2oJ9U:hfYSB=nbEKnkkgbfmn3SWNnf0VD?S^J`lheAf7`; 3Im[2e?DnJl7^Pb6o Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:172172 comp.emacs:98625 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67319 Archived-At: Xah Lee writes: > On Aug 20, 1:58 am, Tamas K Papp wrote: >> Hi, >> >> I have seen screenshots of Emacs running with many buffers. For >> example, having Emacs on the whole screen and splitting the buffers >> like this: >> >> A|B >> -+- >> C|D >> >> I know how to do the splitting, but I am curious about what people use >> to move around. Using C-x o (other-window) is a pain with many >> windows, same applies to selecting buffers by name (at least for me), >> and I want to avoid using the mouse for this. I am thinking of >> something like "move to buffer B, regardless of what is there". >> >> I am interested in how other people handle these setups. .emacs >> snippets are welcome, too. Also, feel free to tell me if I am >> trying to do something silly that does not mesh well with Emacs. > > I reassign it so the key is right on the home row and using thumb > instead of pinky. > > after a year or two, this eventually became a system of keybinding. > http://code.google.com/p/ergoemacs/ > > then, later i added a shifted version to go into the other direction. > > typically, this works well for 2 or 3 split panes. But for 4 or more, > mouse is probably best. > I almost don't use more than 2 split planes. If needed, i open another > window (emacs frame), then there's another easy shortcut to cycle > among windows. > > you might as well define another easy key to easily split and unsplit > the panes. > > Here's snippet of code, assuming you use dvorak keyboard: > > (global-set-key (kbd "M-o") 'move-cursor-next-pane) > (global-set-key (kbd "M-O") 'move-cursor-previous-pane) > > (global-set-key (kbd "M-2") 'split-window-vertically) > (global-set-key (kbd "M-@") 'split-window-horizontally) > > (global-set-key (kbd "M-1") 'delete-other-windows) > (global-set-key (kbd "M-!") 'delete-window) > > > Xah > ∑ http://xahlee.org/ > > ☄ I use something similar. My idea is to stay close to original emacs bindings but to avoid to many key strokes. ;;; Window splitting (global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument (global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument (global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument (global-set-key (kbd "M-0") 'delete-window) ; was digit-argument (global-set-key (kbd "M-o") 'other-window) ; was prefix ;; Remove locale key binding of M-o in dired (add-hook 'dired-mode-hook 'my-dired-mode-hook) (defun my-dired-mode-hook () (define-key dired-mode-map (kbd "M-o") nil)) ; was dired-omit-mode -- Associate Prof. Ph.D Torben Knudsen Mobile : (+45) 2787 9826 Section of Automation and Control, Direct : 6 8694 Department of Electronic Systems, Email : tk@es.aau.dk Aalborg University Fredrik Bajersvej 7 DK-9220 Aalborg Ø Denmark