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

This is a discussion on Is there a way to switch among splitted windows counter-clockwisely in Emacs? within the Tech Board forums, part of the Community Boards category; I know this thread is a little off-topic, but since most of C++ programmers use emacs, I think this question ...

  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
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,270
    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 09:33 PM.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    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, 12:14 PM
  2. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 09:39 AM
  3. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 03:58 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM
  5. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 11:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21