?

Log in

No account? Create an account
Notes from a Medium-Sized Island [entries|archive|friends|userinfo]
Jason

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Aug. 25th, 2010|01:44 pm]
Jason
[Tags|]

Today I learned that C-c C-c and C-u C-c C-c are comment and uncomment region in (at least) C-mode in emacs. All these years I've been doing M-x comment-region...
LinkReply

Comments:
[User Picture]From: ssaiscps
2010-08-26 04:24 am (UTC)
C-c : for LaTeX. Do it again to undo the comments.
(Reply) (Thread)
[User Picture]From: eub
2010-08-26 06:09 am (UTC)
Also! you can add new keybindings.
(Reply) (Thread)
[User Picture]From: gustavolacerda
2010-08-26 01:41 pm (UTC)
I also use M-x comment-region. Thanks for the C-u C-c C-c tip.

The great thing about emacs, besides the programmability, is the consistent user interface. In what other program can "comment-region" have a context-dependent functionality in several contexts, and yet be accessible with a mere 4-to-6 keystrokes?

Edited at 2010-08-26 01:42 pm (UTC)
(Reply) (Thread)