cs-education / sysbuild

A system programming learning environment in the browser
https://cs-education.github.io/sys/
Other
36 stars 35 forks source link

Current auto indent is not using ace editor's features #147

Closed jjang16 closed 8 years ago

jjang16 commented 8 years ago

ace editor supports fantastic auto indents, and we are using our terrible implementation.

jjang16 commented 8 years ago

148

neelabhg commented 8 years ago

Why was this issue closed? What is the current status of auto indenting?

coltonmercurio commented 8 years ago

This issue was created without completely investigating auto-indenting issues. @jjang16 was under the assumption that using Ace's indenting feature would correct current issues with indenting (comment blocks, trailing bracket, etc...). After implementing it with Ace's indenting feature he came to the conclusion that auto-indenting was no longer working. So he revert back to the original implementation ensuring non-C files were not auto-indented and that the auto-indenting didn't remove the existing error annotations. All of the previous issues with indenting sill remain.

neelabhg commented 8 years ago

@cmercur2 Thanks for the explanation.

Just to make sure we are on the same page, there are two ways we refer to "auto-indent":

  1. Indent the next line when the user presses enter (implemented by Ace)
  2. Indent the whole file whenever any input is performed (implemented by us, built upon the above "next line auto indent" functionality of Ace)

Many of the issues arising with "auto indentation" are unique to one of the above two functionalities in our app. In particular, #67 is an issue with 1 (next-line-auto-indent), while #124 and #99 are issues with 2 (whole-file-live-auto-indent).

Is the above description somewhat accurate? If so, we should probably put this in the Wiki or something. As far as I understand, we already use Ace's full auto-indent feature. Is there some newer functionality we are missing?

Just to be clear, I just wanted to document the current state of auto-indent in our app, no need to take any further action at this point.

coltonmercurio commented 8 years ago

I am referring to the second definition. And yes, you are exactly correct in your descriptions of the state. I will make sure to add the current state of auto-indent to our project wrap-up documentation.

neelabhg commented 8 years ago

Great. Thanks!