[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to rebind keys "C-j" to join-line -- SOLVED!
From: |
Dieter Wilhelm |
Subject: |
Re: How to rebind keys "C-j" to join-line -- SOLVED! |
Date: |
Tue, 07 Aug 2007 22:36:11 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
"Alex Wei" <swei@arrayinc.com> writes:
> Hi all
>
> I've figured out how to secure binding my keys :D , I found two hooks that
> will
> guarantee my key-bindings will not be overrided.
>
> (defun my-key-binding ()
> "Customize my key bindings after Emacs startup."
> (interactive)
> ;; Key
> bindings
> (local-set-key (kbd "<RET>") 'newline-and-indent)
> (local-set-key (kbd "C-.") 'set-mark-command)
Why not the standard binding (C-SPC)?
> (local-set-key (kbd "C--") 'kill-whole-line)
the same here C-S-backspace? (OK, I answer it myself: One needs three
keys.) But you are restricting yourself to M-- and C-u- for negative
prefix arguments.
> (local-set-key (kbd "C-=") 'copy-whole-line)
Yes, this is a function I'm also missing badly in Emacs.
> (local-set-key (kbd "C-o") 'open-newline)
What is open-newline, something like C-e RET?
> (local-set-key (kbd "C-j") 'join-line)
As I said M-^ is not so bad either ;-)
> (add-hook 'emacs-startup-hook 'my-key-binding)
> (add-hook 'change-major-mode-hook 'my-key-binding)
Sorry I do not know these hooks, but wouldn't for example:
(global-set-key "\C-o" 'open-newline)
in your .emacs have the same effect without adding hooks?
> Thanks anyway!
You are very welcome.
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
- How to rebind keys "C-j" to join-line, Alex Wei, 2007/08/03
- Re: How to rebind keys "C-j" to join-line, Dieter Wilhelm, 2007/08/03
- Re: How to rebind keys "C-j" to join-line, Dieter Wilhelm, 2007/08/06
- Re: How to rebind keys "C-j" to join-line, Alex Wei, 2007/08/06
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Alex Wei, 2007/08/07
- Re: How to rebind keys "C-j" to join-line -- SOLVED!,
Dieter Wilhelm <=
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Alex Wei, 2007/08/07
- Message not available
- Re: How to rebind keys "C-j" to join-line -- SOLVED!, Daniel Jensen, 2007/08/07