edit-thing.el is like
narrow-to-region on steroids.
Rather than merely narrowing the current buffer, or using narrowing an
edit-thing will synchronize the contents of a
region with an entirely independent buffer.
Although this strategy is decidedly more heavy-weight, it is
compatible with even the most finicky major modes.
also "dedent" the edit-buffer to improve indentation behavior when
editing blocks of code.
Select a region and invoke