[racket] editing racket code effectively

From: Tom McNulty (tom at cetiforge.com)
Date: Tue Nov 15 21:22:08 EST 2011

Be sure to check out the following doc, there are lots of useful bindings for efficient editing. 

http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html?q=keybindings

For printf statements in particular:

> C-c C-l : wraps a let around the sexpression following the insertion point and puts a printf in at that point (useful for debugging).


Personally, I'd be lost without these two ;-) 

> C-c C-o : the sexpression following the insertion point is put in place of its containing sexpression
> 
> M-C-k : delete forward one S-expression
> 


- Tom





On 2011-11-15, at 6:33 PM, David Vanderson wrote:

> Question for those who work in Racket on a day-to-day basis:
> 
> How can I edit Racket code more effectively?  To be more concrete, two speedbumps I'm hitting are:
> 
> - how to add temporary debugging statements
> - how to temporarily comment out some code
> 
> I always seem to be fighting to make sure the parens are balanced, both in DrRacket and Vim.  I'm comfortable editing line-based languages (Java, Python, Ruby, etc.).  Should I structure my code to be more line-oriented (using more internal defines), or try to use sexp-based editing?
> 
> Thanks,
> Dave
> 
> 
> 
> 
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users




Posted on the users mailing list.