ledit.1 (4590B)
1 .Dd November 4, 2023 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 .Sh ANTI-DESCRIPTION 37 .Nm 38 is not a code editor. 39 Features for code editing may be added in the future, but the main 40 purpose is currently to edit other text. 41 .Pp 42 .Nm 43 is not a general-purpose text editor. 44 It is content to be useful for some tasks and does not feel insulted when 45 other editors are used for other tasks. 46 .Pp 47 .Nm 48 is not a minimalistic text editor. 49 It probably counts as reasonably minimalistic in the modern world, but 50 that is not the main goal. 51 .Pp 52 .Nm 53 is not a good text editor. 54 .Sh OPTIONS 55 .Bl -tag -width Ds 56 .It Fl c Ar config 57 Load the configuration file given by 58 .Ar config . 59 If this option is not specified, 60 .Nm 61 will attempt to read the configuration file 62 .Pa .leditrc 63 in the user's home directory before using the defaults. 64 .El 65 .Sh KEY BINDINGS 66 See the descriptions given in 67 .Xr leditrc 5 68 and the default bindings in 69 .Pa leditrc.example . 70 .Sh COMMANDS 71 See the descriptions given in 72 .Xr leditrc 5 73 and the default bindings in 74 .Pa leditrc.example . 75 .Sh MOUSE ACTIONS 76 There currently are not many mouse actions. 77 Clicking and dragging with the left mouse button enters visual mode and 78 selects text, which is always copied into the X11 primary selection. 79 .Pp 80 Note that text selection currently does not work in the line editor 81 because the author is too lazy to implement that. 82 .Pp 83 Middle click in insert mode pastes the current X11 primary clipboard. 84 Note that the text is pasted at the current cursor position, not the 85 position of the mouse cursor. 86 The author prefers this way. 87 .Sh CONFIGURATION 88 See 89 .Xr leditrc 5 . 90 .Sh MISCELLANEOUS 91 .Nm 92 includes a fair number of sanity checks (asserts) to make sure some illegal 93 conditions never occur. 94 If one of these checks fails, 95 .Nm 96 will write the error to stderr and abort. 97 In order to avoid losing work, it will attempt to write out the entire 98 contents of the buffer to a new file whose name is based on the current 99 filename, but with 100 .Dq -emergency-dump- 101 and a random string of characters 102 appended. 103 Perhaps this functionality will be removed once 104 .Nm 105 is perfect and all bugs have been removed. 106 .Sh EXIT STATUS 107 .Ex -std 108 .Sh QUIRKS 109 The cursor movement commands try to move left/right visually instead of moving 110 through the text logically. 111 This causes weird cursor jumps when working with bidirectional text in normal mode. 112 This may be fixed in the future, but it currently is not clear how to make the 113 behavior more logical. 114 .Pp 115 Due to the way undo is implemented, when text is typed in one view in insert 116 mode, then in another view, and then again in the first one, the last two 117 inserts will be undone in one go since both views were in insert already. 118 I'm not sure how to make this more logical, though. 119 Maybe it could be 120 .Dq improved 121 by also saving the view in the undo stack, 122 but that would cause problems because views can be added and removed, 123 and it would maybe not even be more logical. 124 .Pp 125 Scroll offset is stored as a pixel value, so a view may scroll when text is 126 added or deleted in another view. 127 Additionally, when a new view is created, the scroll offset from the old view 128 is taken, which may be weird if the window of the new view is a different size. 129 .Pp 130 Spaces at the ends of lines are weird because they have to be drawn manually 131 instead of highlighting them and letting Pango take care of it because the 132 Pango developers decided to hide spaces at the end of a line. 133 .Sh SEE ALSO 134 .Xr ed 1 , 135 .Xr vi 1 , 136 .Xr vim 1 , 137 .Xr leditrc 5 138 .Sh AUTHORS 139 .An lumidify Aq Mt nobody@lumidify.org 140 .Sh BUGS 141 Too many to count. 142 See 143 .Sx TINY SUBSET OF BUGS . 144 .Sh TINY SUBSET OF BUGS 145 Well, I guess I'm too lazy to collect bugs right now.