[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to change keys for uncomment (C-u C-c C-c)?
From: |
rgb |
Subject: |
Re: How to change keys for uncomment (C-u C-c C-c)? |
Date: |
21 Apr 2005 13:09:48 -0700 |
User-agent: |
G2/0.2 |
JS wrote:
> Kevin Rodgers wrote:
>
> > JS wrote:
> > > When I want to uncomment someting I first need to press C-u
followed
> > by C-c
> > > C-c but that is not very handy. Is it possible to reconfigure
C-u C-c
> > > C-c into ie.:
> > >
> > > C-c C-c C-v instead?
> >
> > All things are possible. But `C-c C-c C-v' is not necessarily a
good
> > choice, because its prefix key `C-c C-c' is already bound to
> > comment-region (as you know) and all `C-c C-LETTER' keys are
reserved
> > for major modes. But since all of the `C-c LETTER' keys are
reserved
> > for users, how about `C-c c' or `C-c u':
> >
> > (add-hook 'this-major-mode-hook ; e.g. 'c-mode-common-hook
> > (lambda ()
> > (local-set-key "\C-cc" 'uncomment-region))) ; or "\C-cu"
> >
>
> I just wrote this in my .emacs file:
>
>
> (add-hook 'this-major-mode-hook
> (lambda ()
> (local-set-key "\C-cc" 'uncomment-region)))
'this-major-mode-hook is supposed to be replace by the name of the
mode hook whose mode you actually want the key defined within.
Perhaps if you just use this.
(global-set-key "\C-cc" 'uncomment-region)
And move to something more complicated (such as the prior suggestion)
if this causes you problems.
- Re: How to change keys for uncomment (C-u C-c C-c)?, (continued)
- Re: How to change keys for uncomment (C-u C-c C-c)?, JS, 2005/04/21
- Re: How to change keys for uncomment (C-u C-c C-c)?, David Hansen, 2005/04/21
- Re: How to change keys for uncomment (C-u C-c C-c)?, JS, 2005/04/21
- Re: How to change keys for uncomment (C-u C-c C-c)?, David Hansen, 2005/04/21
- Re: How to change keys for uncomment (C-u C-c C-c)?, David Hansen, 2005/04/21
- Re: How to change keys for uncomment (C-u C-c C-c)?, JS, 2005/04/22
- Re: How to change keys for uncomment (C-u C-c C-c)?, Mathias Dahl, 2005/04/22
- Re: How to change keys for uncomment (C-u C-c C-c)?, JS, 2005/04/22
Re: How to change keys for uncomment (C-u C-c C-c)?, Kevin Rodgers, 2005/04/21
Message not available