URI: 
       ledit.1 - ledit - Text editor (WIP)
  HTML git clone git://lumidify.org/ledit.git (fast, but not encrypted)
  HTML git clone https://lumidify.org/ledit.git (encrypted, but very slow)
  HTML git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/ledit.git (over tor)
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       ledit.1 (4726B)
       ---
            1 .Dd September 5, 2024
            2 .Dt LEDIT 1
            3 .Os
            4 .Sh NAME
            5 .Nm ledit
            6 .Nd weird text editor
            7 .Sh SYNOPSIS
            8 .Nm
            9 .Op Fl c Ar config
           10 .Op Ar file
           11 .Sh DESCRIPTION
           12 .Nm
           13 is a vi-like text editor for people who switch between keyboard layouts
           14 frequently and/or work with languages that require complex text layout.
           15 It combines the drawbacks of vi-like terminal editors with the drawbacks
           16 of graphical editors.
           17 .Pp
           18 Additionally, it allows multiple views on a text buffer so that
           19 different parts of a file can be shown at the same time.
           20 .Pp
           21 It is assumed that readers of this manual page are already familiar
           22 with
           23 .Xr vi 1 .
           24 .Pp
           25 Most documentation is actually included in
           26 .Xr leditrc 5
           27 because that's where all the key and command bindings are discussed.
           28 It would be nice to show the default key bindings in a nice format
           29 here, but that would require too much work, so you'll just have to
           30 look at the descriptions in
           31 .Xr leditrc 5
           32 and the default bindings in
           33 .Pa leditrc.example .
           34 .Pp
           35 WARNING: All input data is assumed to be utf8!
           36 
           37 Input lines are split at
           38 .Sq \en ,
           39 .Sq \er ,
           40 .Sq \en\er ,
           41 or
           42 .Sq \er\en ,
           43 while lines written to output files only ever use
           44 .Sq \en .
           45 .Sh ANTI-DESCRIPTION
           46 .Nm
           47 is not a code editor.
           48 Features for code editing may be added in the future, but the main
           49 purpose is currently to edit other text.
           50 .Pp
           51 .Nm
           52 is not a general-purpose text editor.
           53 It is content to be useful for some tasks and does not feel insulted when
           54 other editors are used for other tasks.
           55 .Pp
           56 .Nm
           57 is not a minimalistic text editor.
           58 It probably counts as reasonably minimalistic in the modern world, but
           59 that is not the main goal.
           60 .Pp
           61 .Nm
           62 is not a good text editor.
           63 .Sh OPTIONS
           64 .Bl -tag -width Ds
           65 .It Fl c Ar config
           66 Load the configuration file given by
           67 .Ar config .
           68 If this option is not specified,
           69 .Nm
           70 will attempt to read the configuration file
           71 .Pa .leditrc
           72 in the user's home directory before using the defaults.
           73 .El
           74 .Sh KEY BINDINGS
           75 See the descriptions given in
           76 .Xr leditrc 5
           77 and the default bindings in
           78 .Pa leditrc.example .
           79 .Sh COMMANDS
           80 See the descriptions given in
           81 .Xr leditrc 5
           82 and the default bindings in
           83 .Pa leditrc.example .
           84 .Sh MOUSE ACTIONS
           85 There currently are not many mouse actions.
           86 Clicking and dragging with the left mouse button enters visual mode and
           87 selects text, which is always copied into the X11 primary selection.
           88 .Pp
           89 Note that text selection currently does not work in the line editor
           90 because the author is too lazy to implement that.
           91 .Pp
           92 Middle click in insert mode pastes the current X11 primary clipboard.
           93 Note that the text is pasted at the current cursor position, not the
           94 position of the mouse cursor.
           95 The author prefers this way.
           96 .Sh CONFIGURATION
           97 See
           98 .Xr leditrc 5 .
           99 .Sh MISCELLANEOUS
          100 .Nm
          101 includes a fair number of sanity checks (asserts) to make sure some illegal
          102 conditions never occur.
          103 If one of these checks fails,
          104 .Nm
          105 will write the error to stderr and abort.
          106 In order to avoid losing work, it will attempt to write out the entire
          107 contents of the buffer to a new file whose name is based on the current
          108 filename, but with
          109 .Dq -emergency-dump-
          110 and a random string of characters
          111 appended.
          112 Perhaps this functionality will be removed once
          113 .Nm
          114 is perfect and all bugs have been removed.
          115 .Sh EXIT STATUS
          116 .Ex -std
          117 .Sh QUIRKS
          118 The cursor movement commands try to move left/right visually instead of moving
          119 through the text logically.
          120 This causes weird cursor jumps when working with bidirectional text in normal mode.
          121 This may be fixed in the future, but it currently is not clear how to make the
          122 behavior more logical.
          123 .Pp
          124 Due to the way undo is implemented, when text is typed in one view in insert
          125 mode, then in another view, and then again in the first one, the last two
          126 inserts will be undone in one go since both views were in insert already.
          127 I'm not sure how to make this more logical, though.
          128 Maybe it could be
          129 .Dq improved
          130 by also saving the view in the undo stack,
          131 but that would cause problems because views can be added and removed,
          132 and it would maybe not even be more logical.
          133 .Pp
          134 Scroll offset is stored as a pixel value, so a view may scroll when text is
          135 added or deleted in another view.
          136 Additionally, when a new view is created, the scroll offset from the old view
          137 is taken, which may be weird if the window of the new view is a different size.
          138 .Pp
          139 Spaces at the ends of lines are weird because they have to be drawn manually
          140 instead of highlighting them and letting Pango take care of it because the
          141 Pango developers decided to hide spaces at the end of a line.
          142 .Sh SEE ALSO
          143 .Xr ed 1 ,
          144 .Xr vi 1 ,
          145 .Xr vim 1 ,
          146 .Xr leditrc 5
          147 .Sh AUTHORS
          148 .An lumidify Aq Mt nobody@lumidify.org
          149 .Sh BUGS
          150 Too many to count.
          151 See
          152 .Sx TINY SUBSET OF BUGS .
          153 .Sh TINY SUBSET OF BUGS
          154 Well, I guess I'm too lazy to collect bugs right now.