sled manual

SLED(1)                     General Commands Manual                    SLED(1)


       sled - Simple text editor


       sled [-h | --help]

       sled [-V | --full-version]

       sled [-v | --version]

       sled [filename]


       sled Copyright © 2022-2023 Strahinya Radich.
       This  program  is licensed under GNU GPL v3 or later.  See the file LI-
       CENSE in the sled repository for details.  File termbox.h is  based  on
       termbox2  TUI  library,  (c) 2021 termbox developers, which is released
       under the terms of Expat license, see the file LICENSE.termbox.


       sled is a simple text editor with a terminal UI.


       sled has four modes of operation. The initial mode which is  active  on
       startup  is  the  insert mode.  It behaves like one would expect from a
       "normal" text editor: most characters are  self-inserting,  arrow  keys
       and backspace/delete work as expected, and so on.  Command mode behaves
       more like vi(1): characters like h, j, k, l no longer insert themselves
       but  execute commands (in this case movement commands).  Overwrite mode
       is the same as insert mode, except that newly inserted  characters  re-
       place  the existing ones instead of being inserted among them. Last, in
       selection mode, moving around the file extends the selection, and  most
       commands  that  alter text instead delete the selection and exit selec-
       tion mode.


       Global key bindings are active in all modes, and are as follows:

       |Key             Action                                      |
       |Esc             Close dialog, clear error, cancel selection |
       |F1              Show help dialog                            |
       |F3              Go to next found match                      |
       |S-F3            Go to previous found match                  |
       |F4              Show search, then replace dialog            |
       |F7              Show only search dialog                     |
       |Home or C-A     Go to start of line                         |
       |PgUp or C-B     Go to previous page                         |
       |Backspace       Erase character before cursor               |
       |C-\             Toggle command mode                         |
       |C-C             Yank to paste buffer                        |
       |Delete or C-D   Erase character under cursor                |
       |End or C-E      Go to end of line                           |
       |Insert          Toggle overwrite                            |
       |PgDown or C-F   Go to next page                             |
       |C-K             Erase to end of line                        |
       |C-L             Show Go to line dialog                      |
       |C-N             Go to next found match                      |
       |C-O             Reread (reopen) file                        |
       |C-P             Go to previous found match                  |
       |C-Q             Quit                                        |
       |C-R             Go to previous word                         |
       |C-S             Write (save) file                           |
       |C-Space         Toggle selection mode                       |
       |C-T             Go to next word                             |
       |C-U             Erase to start of line                      |
       |C-V             Paste from paste buffer                     |
       |C-X             Cut to paste buffer                         |
       |C-Y             Erase the entire current line               |
       |C-Z             Suspend                                     |
       |C-W             Erase previous word                         |

       In insert mode and overwrite mode, characters are  self-inserting,  and
       Enter  inserts  new  line.  All the global keys apply to insert mode as
       well. Entering overwrite mode switches back to  insert  mode  when  the
       overwrite mode is toggled off, even when the overwrite mode was entered
       from the command mode.

       In command mode, the following vi-like keys are in effect:

       |Key   Action                                     |
       |/     Show only search dialog                    |
       |\     Show search, then replace dialog           |
       |:     Show Go to line dialog                     |
       |0     Go to start of line                        |
       |$     Go to end of line                          |
       |d     Erase the entire current line              |
       |G     Go to last line in the file                |
       |g     Go to first line in the file               |
       |H     Go to first line on the screen             |
       |h     Go to previous character                   |
       |J     Join lines in selection/line and next line |
       |j     Go to next line                            |
       |k     Go to previous line                        |
       |L     Go to last line on the screen              |
       |l     Go to next character                       |
       |M     Go to middle line on the screen            |
       |N     Go to previous found match                 |
       |n     Go to next found match                     |
       |P     Paste from paste buffer                    |
       |q     Quit                                       |
       |R     Toggle overwrite mode                      |
       |r     Reread (reopen) file                       |
       |v     Toggle selection mode                      |
       |W     Go to previous word                        |
       |w     Go to next word                            |
       |X     Cut to paste buffer                        |
       |x     Erase character under cursor               |
       |y     Yank to paste buffer                       |
       |Z     Write (save) file                          |

       If selection mode was entered from insert mode (or insert mode is acti-
       vated  during  selection  mode), typing any self-inserting character or
       activating key bindings which modify text, like  Delete  or  C-K,  will
       erase  the  selected  text  instead,  and in the case of self-inserting
       characters, insert the character in  question,  exiting  the  selection

       Similar  holds true when the selection mode is entered from the command
       mode or the command mode is activated during the selection mode, except
       that vi-like key bindings which modify text will have the effect on the


       Status line is comprised of a number of segments, by default four.

       •   The leftmost segment displays the current filename, with an  aster-
           isk (*) if there are any unsaved changes.

       •   Second segment displays the current mode.

       •   Third segment displays the current position within the file, in the

               [column]:[row] ([percentage of total lines]%)

       •   Fourth segment shows quick help.


       Strahinya Radich, <>


       •   UTF-8 character set is assumed.

       •   CJK characters are unsupported/problematic. This is a limitation of
           termbox library. See


           for more details.

       •   Only  one file can be edited at a time, and no additional files can
           be loaded at runtime. This is a design decision.

       •   If backup creation is enabled (CREATE_BACKUPS in config.h), the di-
           rectory of the edited file must be writable by the user to open the


       Bugs can be reported using the ticket tracker at:  <

sled 0.11.11                   October 14, 2023                        SLED(1)