"Smart" Block Copy & Paste
Skip Montanaro
skip at pobox.com
Wed Oct 15 21:03:28 EDT 2003
bboman> If you do this, Emacs (in python-mode) will autoindent for you
bboman> as you type. Now when you copy a block, all you have do is
bboman> press TAB at the beginning of each line and the indentation is
bboman> corrected. The indent-region DOES NOT WORK FOR THIS, you have
bboman> to indent one line at a time (this could be fixed by editing
bboman> python-model.el).
Have you tried py-shift-region-(left|right) (C-c < and C-c >)? No extra
keyword insertion is needed. You can paste a block of code, hit C-x C-x to
select it (perhaps twice to make sure your cursor is at the start of the
block), then one of the above pairs to move the block left or right as
needed.
Skip
More information about the Python-list
mailing list