ajaxorg / ace

Ace (Ajax.org Cloud9 Editor)
https://ace.c9.io
Other
26.77k stars 5.29k forks source link

Mode specific and custom wrap indents #4451

Open vassudanagunta opened 3 years ago

vassudanagunta commented 3 years ago

Currently Ace supports three wrapping behaviors:

  1. wrap indent disabled:

       This line wraps with no
    indentation at all.
  2. text mode, wrap indent enabled:

       This line wraps with indentation 
       matching the its initial indent.
  3. code mode, wrap indent enabled

       stdout.write("This line wraps with indentation
           a fixed amount beyond its initial indent.")

These behaviors are hard-coded, without any way for a Mode to hook in custom behavior to suit the particular conventions of its file type, nor a means to add configuration options.

Some desirable alternate behaviors:

I propose that getWrapIndent() be customizable by Mode. I'm even willing to do the implementation. But first, would such changes be approved by the project maintainers?

vassudanagunta commented 3 years ago

For reference: #2187.

nightwing commented 3 years ago

If this change doesn't add performance overhead to the case when it is not enabled, it will be very welcome.

github-actions[bot] commented 2 years ago

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

vassudanagunta commented 2 years ago

I still plan on fixing this with a PR when I get the chance.

github-actions[bot] commented 1 year ago

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

vassudanagunta commented 1 year ago

Sorry, I still plan on working on this once I get through some higher priority projects, which, btw, would make use of the proposed custom wrap indent functionality.

github-actions[bot] commented 6 months ago

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

vassudanagunta commented 6 months ago

Still plan to do this.