Ticket #4492 (closed enhancement: duplicate)

Opened 9 months ago

Last modified 9 months ago

Implementation of screen-only division of long lines

Reported by: psprint Owned by:
Priority: major Milestone:
Component: mcedit Version: master
Keywords: soft-wraps,wraps,long-lines Cc: kybl
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Hi,
I've implemented screen-only division of long lines. I'll call it soft wraps.

I think that this feature is missing from mcedit. Currently, when a line exceeds the screen it is scrolled right. This is, IMHO, a less effective way of working with long lines. More natural is to have them soft-divided by the editor with moving, home/end keys support, etc.

The patch is little long and complex, but I'm using it from 2 years with no problems. To have the lines soft wrapped, select "Soft wraps" in the General options dialog.

Attachments

0001-Implementation-of-soft-wraps-screen-only-division-of.patch (112.2 KB) - added by psprint 9 months ago.
Add soft wraps to MCEdit

Change History

Changed 9 months ago by psprint

Add soft wraps to MCEdit

comment:2 Changed 9 months ago by psprint

  • Component changed from mcdiff to mcedit

comment:3 Changed 9 months ago by ossi

your example is kinda counter-productive, as code is the exact thing one usually shouldn't soft-wrap.

that also illustrates that the setting needs to be switchable via a hotkey, as it is in the viewer.

another aspect is that a good soft-wrap implementation (*) somehow visualizes the continued lines, which is particularly important for text without indentation. this can be easily done by visualizing line breaks along with other whitespace (see libreoffice) when soft-wrapping is enabled. another style is to indent everything, and put some marker in front of continuation lines. yet another style i've seen (in kate or qt creator) is indenting the continuation lines like their "parent" lines and filling the leading whitespace with a grey-ish pattern, but this obviously doesn't work for non-indented text.

(*) the textedit i'm just entering this into clearly isn't a good implementation ...

comment:4 Changed 9 months ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #1447.
I can't believe that you didn't find #1447

Note: See TracTickets for help on using tickets.