Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 243 by duncan.coutts: auto-indent (preferably based on layout)
http://code.google.com/p/yi-editor/issues/detail?id=243

Vim has auto-indent. It's pretty dumb but useful. Yi could do the same or
better.

For example:

foo = do blah
          blah
              ^-- hit <enter> here
          ^-- would like to end up with cursor here

So that's simply based on the starting point of the previous line. Of
course Yi knows the indentation of the current layout(s) so we could
probably more intelligently select. For example starting at the same layout
indent and pressing backspace or something, go to indents of outer scope
layouts. In the above example there is just the do layout and the top
level. But we could have say:

foo = do
   withBar $ \_ -> do
   |  blah
   |  |
   |  |
Here we could backspace to get to the outer layout and finally back to the
top level.

Perhaps overloading backspace for this is too much. Perhaps there's a
better key to bind it to. I guess that's an orthogonal question to the
functionality.

Please provide relevant version information:

What version of Yi are you using? 0.5.2
What version of GHC? 6.10.1
What version of Cabal? 1.6.0.2
What operating system/version? Linux

If you generated it (--debug) please provide your .yi.dbg file

Please provide any additional information below.

I read the Yi incremental parser paper which looks excellent. It made me
think I should come try yi again.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to