These ones, at least, are in the Racket menu (and so have shortcuts).
> Also at the prompt is there a keystroke to bring up last typed entry
> same as command prompt?
esc-p. Also, depending on your platform, there may be others.
Check out the Edit|Keybindings submenu.
Robb
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
-----Mensaje original-----
De: users-...@racket-lang.org [mailto:users-...@racket-lang.org] En
nombre de Robby Findler
Enviado el: domingo, 02 de enero de 2011 13:55
<<
On Sun, Jan 2, 2011 at 6:49 AM, Sayth Renshaw <flebbe...@gmail.com>
wrote:
> Are there any key shortcuts in racket to comment and uncomment a block of
> code?
These ones, at least, are in the Racket menu (and so have shortcuts).
>>
Are you sure? I don't see them. I'm using the Windows version of DrRacket
and the only commands that have keybindings under the Racket menu are Run,
Ask the Program to Quit, Force the Program to Quit and Reindent All.
I can't find them either in the Edit|Keybindings submenu.
This is something that has bugged me for a while, since I'm working my way
through HTDP and commenting code in and out is something that I do a lot of.
Perhaps those keybindings were left out of the Windows build for some
reason?
Thanks,
Miguel
Try alt-c and then c for comment out and alt-c u for uncomment.
Robby
So ALT+C opens the Ra_c_ket menu and C (or ALT+C is fine if you still
have the ALT key held down) chooses the _C_omment Out with Semicolons
command.
esc-ctrl-; comments
and
esc-ctrl-= uncomments
This is for emacs keybindings mode. I dont know if it works when emacs
keybindings are off.
<<
In other words there aren't shortcut keys ("accelerators") per se
bound to these commands. But you can use the keyboard to choose an
item from a menu, as usual in Windows. (This is the one biggest thing
I miss when I'm using OS X. (No, pressing C+F2 arrow arrow arrow arrow
... isn't the same :) )).
So ALT+C opens the Ra_c_ket menu and C (or ALT+C is fine if you still
have the ALT key held down) chooses the _C_omment Out with Semicolons
command.
>>
Yeah, I got that, thanks. :)
At any rate, I find it a bit surprising that there aren't any "proper"
shortcuts for this in DrRacket. There's a bazillion of them under Active
Keybindings, and I doubt all of them are more useful or frequently used than
the act of commenting/uncommenting code. But then I'm not a professional
programmer, so what do I know.
On a loosely related note, are there any plans of implementing a vi-mode for
DrRacket? I've never actually used vi, mind you, but I've always been
intrigued by its "do everything with the keyboard without so much as looking
at it" philosophy. Having it in DrRacket might entice me to actually try it.
I hope the Emacs crowd won't be terribly offended by this suggestion. :)
Miguel