CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

✨ Setting to Wrap lines to editor width

Open austincondiff opened this issue 2 years ago • 8 comments

Is your feature request related to a problem? Please describe.

  • CodeEditApp/CodeEditTextView#84

This issue should be worked on with the above issue.

Describe the solution you'd like

Add a setting under Text Editing that allows a user to enable or disable line wrapping within the editor.

Indented lines should wrap to set width.

Additional context

Screenshot 2022-12-17 at 4 21 05 PM

austincondiff avatar Dec 17 '22 22:12 austincondiff

@austincondiff - I'd like to nab this one.

ben-p-commits avatar Jan 03 '23 20:01 ben-p-commits

Interesting- I couldn't get horizontal text wrapping to work until I commented out this line:

STTextViewController.swift:86 image

It appears to have regressed the default functionality provided by STTextView's widthTracksTextView property.

ben-p-commits avatar Jan 03 '23 22:01 ben-p-commits

Per Khan's comment on discord,

image

Will see if I wrap this work before he wraps his on adopting TK2.

ben-p-commits avatar Jan 03 '23 23:01 ben-p-commits

Thank you for documenting this here @ben-p-commits!

austincondiff avatar Jan 03 '23 23:01 austincondiff

@austincondiff - After doing some digging, it appears that implementing functionality needed for the wrapped line indentation stepper control...

...as implied by this screencap: image

would require some pretty sensitive changes to STTextView. Have we run into this sort of problem yet?

I can get this enhancement working with the toggle option for wrapping, but implementing the stepper setting and associated behavior in the textview itself may be better split out as a separate enhancement imo.

ben-p-commits avatar Jan 04 '23 22:01 ben-p-commits

That is fine, we may need to create an issue in CodeEditTextView for that then in response to this issue.

austincondiff avatar Jan 04 '23 22:01 austincondiff

I'll add one. Thanks.

ben-p-commits avatar Jan 04 '23 22:01 ben-p-commits

Added https://github.com/CodeEditApp/CodeEditTextView/issues/103.

ben-p-commits avatar Jan 04 '23 22:01 ben-p-commits

@austincondiff - this has merged and should be good to close. As mentioned before- the indenting behavior is covered in a separate issue in CodeEditTextView

ben-p-commits avatar Jan 13 '23 17:01 ben-p-commits