[MonoDevelop] Re: Reformat source file
John Luke
john.luke at gmail.com
Wed Jun 8 21:36:10 EDT 2005
Jacob Ilsø Christensen wrote:
>Hi.
>
>Ok, here is what I plan to do:
>
>1) Parse the file currently viewing.
>2) Traverse the built AST in parallel with traversing the file.
>3) Indent a specific line according to what level and what item is
>currently looked at in the AST.
>
>Does this sound like a way to do it?
>
It sounds like _a_ way, but there are many. You might want to take a
look at one of the editors that does
this already vim, emacs, eclipse, etc. Have you looked at the existing
FormattingStrategy stuff in the various language bindings?
Also, consider multiline pasting and probably more little corner cases I
can't think of right now.
>Do we want such a feature in MD?
>
>
I think we do. Perhaps starting with "format a file on ctl+shift+f" and
make sure it works right (without changing/losing information) would be
a smaller first step. Then format as you go can come later after you
know all the issues.
More information about the Monodevelop-list
mailing list