"Smart" Block Copy & Paste

Tim Hochberg tim.hochberg at ieee.org
Tue Oct 14 14:33:02 EDT 2003


During the recent, massive, painful Lisp-Python crossposting thread the 
evils of Python's whitespace based indentation were once again brought 
to light. Since Python' syntax is so incredibly brittle, and failure 
prone, it's amazing that we don't have more editor support for our 
feeble minds. To help reduce the severity of this crisis, I decided to 
take a whack at creating smart block copy and paste functionality.

Anyway, I wrote some code to extract indentation information from the 
original file when doing copies and then to match up the indentation in 
a sensible way when doing pastes. The code is still rough and can be 
quite slow in some situations, but I figured it was interesting enough 
to release. If your interested in trying it out or just getting more 
details, the code and instructions for hacking it into Idle are 
available at http://starship.python.net/crew/hochberg/

Regargs,

-tim







More information about the Python-list mailing list