~strahinja/strahinja.srht.site

ref: 60252b58ce204d13891feacd52bcce8760728b38 strahinja.srht.site/sled/index.slw -rw-r--r-- 3.6 KiB
60252b58Страхиња Радић sled/index.slw: Update 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
site-name: sled - Simple text editor
site-desc: Simple text editor
inline-stylesheet: ../index.css
inline-stylesheet: sled.css
canonical: https://strahinja.srht.site/sled/
meta: index-meta.tsv
---

{main}
# sled

**sled** is a simple text editor with a terminal UI.


## Q&A

{dl}
{dt}
**Q: Why can't sled open the file “read only” even if modification
is disallowed?**{/dt}
{dd}{p}
**A:** A text editor's purpose should be to *edit* text files. For just
*viewing* text files, there's **less**(1). This avoids the situation when
opening a file one is not allowed to write to with an editor like **vi**(1),
only to have write operation denied after making numerous edits.{/p}
{p}
Of course, one could argue that screen editors like **vi** already double as
text file viewers, but I think of displaying the contents of a writable file as
being separate from displaying the contents of a non-writable file.{/p}
{p}
If this bothers you, you can use something like the included shell script
**sledv**.{/p}{/dd}{/dl}

{dl}
{dt}
**Q: Is editing multiple files planned?**{/dt}
{dd}
**A:** No, and this is by design. You can edit multiple files at the same time
by running multiple instances of **sled**. You can arrange them on screen
through a terminal multiplexer like **GNU screen**(1) or **tmux**(1), or just
open several terminal emulators like **st**(1) and have your window manager
arrange their windows. Inter-process “clipboard” can be managed by a
terminal multiplexer or X.Org itself.{/dd}{/dl}

{dl}
{dt}
**Q: Is there a _\~/.config/sled/config_ or _\~/.sledrc?_**{/dt}
{dd}
**A:** No, and never will be. **sled** is intended to be configured through
editing _config.h_ and recompilation, like suckless software.{/dd}{/dl}

{dl}
{dt}
**Q: Are plugins planned?**{/dt}
{dd}
**A:** No. Like suckless software, **sled** is meant to be extended through
patches.{/dd}{/dl}

{dl}
{dt}
**Q: How can I configure sled if I installed it (from AUR|through my distro's
package manager)?**{/dt}
{dd}
**A:** You don't. If you want customization/configuration, clone the git repo,
customize and compile it from source, just like with suckless
software.{/dd}{/dl}


## Prerequisites

* C compiler (**GCC**-compatible) - `${SLED_CC:-gcc}`
* **gzip**


## Install

```
$ git clone https://git.sr.ht/~strahinja/sled
$ cd sled
$ su
```

If you have djb **redo**:

```
# redo install
```

if you don't:

```
# ./do install
```


## Bugs and limitations

Bugs can be reported using the [ticket tracker][issue]. See the manpage (`man
sled`) after installing **sled** for more information.


## License

sled - Simple text editor
Copyright (C) 2022 Страхиња Радић

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see [https://www.gnu.org/licenses/][licen].

---

This program includes code from the termbox2 TUI library,

[https://github.com/termbox/termbox2][termbox]

The file `LICENSE.termbox` applies to the portion of this program which is from
the termbox2 library. Currently, this includes only the file `termbox.h`.

{made-by}
{/main}

[issue]: https://todo.sr.ht/~strahinja/sled/
[licen]: https://www.gnu.org/licenses
[termbox]: https://github.com/termbox/termbox2