Have a look at the 'Leo' editor, it has views on your source using 'cloned' nodes. It even allows you to group all the code around a bug and a fix together, document the whole thing and never move any of the original code around.
It's a pretty neat literate programming tool.