Thread: Is there a way to switch among splitted windows counter-clockwisely in Emacs?

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    284

    Is there a way to switch among splitted windows counter-clockwisely in Emacs?

    I know this thread is a little off-topic, but since most of C++ programmers use emacs, I think this question is interested by many C++ programmers:

    Suppose you have 5 splitted windows and you are in window 2. You want to switch to window 1. I know a way to switch to the next window is Ctrl-x o, but you have to switch 4 times to window 1. Is there a way to switch counter-clockwisely?

    Thanks

  2. #2
    Use this: dudeomanodude's Avatar
    Join Date
    Jan 2008
    Location
    Hampton, VA
    Posts
    391
    perhaps write it into your .emacs file?
    Ubuntu Desktop
    GCC/G++
    Geany (for quick projects)
    Anjuta (for larger things)

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    284
    Thanks. That sounds a good idea. But I am not sure what to write to the .emacs file

    Quote Originally Posted by dudeomanodude View Post
    perhaps write it into your .emacs file?

  4. #4
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by meili100 View Post
    Thanks. That sounds a good idea. But I am not sure what to write to the .emacs file
    Decide what key combination you want to use. Suppose you choose C-x p. Add this to your .emacs file:

    Code:
    (global-set-key "\C-xp" 'switch-prev)
    
    (defun switch-prev () (interactive) "Switch to previous buffer"
      (other-window -1))
    EDIT: There is no typo in the above code
    Last edited by brewbuck; 03-12-2008 at 08:33 PM.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    There's a forum for off-topic questions, you know. Two of them, actually.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Or "C-U -1 C-X o" will do that for you.

    And there is already a function "backward-other-window", which in my Xemacs is bound to Ctrl-Shift-Tab.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  2. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  3. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM