[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete window help
From: |
Xah |
Subject: |
Re: delete window help |
Date: |
Tue, 4 Nov 2008 17:47:45 -0800 (PST) |
User-agent: |
G2/1.0 |
Xah wrote:
> > give it a argument of 2. Type this:
>
> > Ctrl+u 2 Ctrl+x 0
>
> > in general, if you want to give a argument to a command, just type Ctrl
> > +u first then argument, then call the command.
bbrady wrote:
> I've tried what you mentioned above and its not working. I also tried
> giving delete-window arguments 0 and 1. The behavior is the same. That
> is, window 'c' becomes the entire left side. Which is the same thing
> that happens when I run Ctrl+x 0 without arguments. (Note, I was in
> window 'a' when I did Ctrl+u 2 Ctrl+x 0)
you are right it didn't work. I didn't pay close attention when
testing it.
easiest way to do what u want is probably with a macro though.
Q: How to record a sequence of keystrokes?
To record keystrokes, type “Ctrl+x (” then start typing your
keystrokes. When done, type “Ctrl+x )”. This records your keystrokes.
To run the keystrokes you've recorded, type “Ctrl+x e”.
Here are the command names and their shortcuts:
start-kbd-macro Ctrl+x (
end-kbd-macro Ctrl+x )
call-last-kbd-macro Ctrl+x e
If you want to use your keyboard macro for future use, you can save
it. To save the macro, first type “Alt+x name-last-kbd-macro”, then
type “Alt+x insert-kbd-macro”, which will insert the lisp code for the
keyboard macro at the cursor point. Put the code in your emacs init
file (usually at “~/.emacs”). Then, you can execute your keyboard
macro like this: “Alt+x yourMacroName” the next time you start emacs.
the above is from this tutorial page:
http://xahlee.org/emacs/emacs_adv_tips.html
here's the macro i got using the above, and tested it works.
(fset 'remove-next-pane
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-
exec-ring-item (quote ([134217825 111 116 104 101 114 45 119 105 110
tab return 134217825 100 101 108 101 116 tab 119 105 110 tab return] 0
"%d")) arg)))
once you have this, you can call it with Alt+x or assign a keyboard
shortcut to it. (see “How to Define Keyboard Shortcuts in Emacs” at
http://xahlee.org/emacs/keyboard_shortcuts.html )
You might be interested to simply define a easy kbd shortcuts for
spliting window and moving cursor to other pane. That way, you might
not need what you asked. For example, for qwerty keyboard, i have:
Alt+s = move cursor to next pane
Alt+2 = split window
Alt+Shift+2 = split window side by side
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html
Xah
\xAD\xF4 http://xahlee.org/
- delete window help, bbrady, 2008/11/05
- Re: delete window help, Xah, 2008/11/04
- Re: delete window help, bbrady, 2008/11/05
- Re: delete window help, aartist, 2008/11/04
- Re: delete window help,
Xah <=
- Re: delete window help, bbrady, 2008/11/05
- Re: delete window help, Xah, 2008/11/05
- Re: delete window help, aartist, 2008/11/05
- Re: delete window help, bbrady, 2008/11/05
- Re: delete window help, Chetan, 2008/11/05
- Re: delete window help, bbrady, 2008/11/05
- Message not available
- Re: delete window help, bbrady, 2008/11/06
- RE: delete window help, Drew Adams, 2008/11/06