summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 22:54:31 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 22:54:31 -0500
commit74ca500fcad9f6f1ee2d43498b92beee92112fb0 (patch)
tree364404844a07d9ffc67469754156f6405c71d335
parent37275ad25635624161c3b51bc81cbd431a200e0c (diff)
better readme, etc
-rw-r--r--README.md13
-rw-r--r--control4
-rw-r--r--development.md13
-rw-r--r--main.c8
-rw-r--r--ted.c1
-rw-r--r--ted.h2
6 files changed, 35 insertions, 6 deletions
diff --git a/README.md b/README.md
index 60677b9..e0194b0 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,12 @@ sudo apt install universal-ctags
## Why?
There are a lot of text editors out there. ted doesn't do anything new.
-I made ted because I wanted a text editor that starts up practically instantaneously,
-and performs well on reasonably-sized files.
+Here are some benefits of ted:
+
+- Starts up immediately.
+- Doesn't lag for reasonably-sized files.
+- VERY small - a full ted installation is &lt; 5 MB.
+
ted isn't incredibly complicated, but it does have some nice features you might not find
in other editors.
@@ -33,9 +37,9 @@ in other editors.
- Find and replace (with regular expressions!)
- Run build command, go to errors
- Run any shell command
+- Autocomplete
- Go to definition
- Go to line number
-- Autocomplete
- Indent/dedent selection, comment/uncomment selection
## Getting started with ted
@@ -208,11 +212,12 @@ To install `ted` from source on Linux, you will also need:
- A C compiler
- The SDL2 development libraries
- cmake (for PCRE2)
+- imagemagick convert (for creating the .deb installer)
These can be installed on Ubuntu/Debian with:
```bash
-sudo apt install clang libsdl2-dev cmake
+sudo apt install clang libsdl2-dev cmake imagemagick
```
Then run `make -j4 release` to build or `sudo make install -j4` to build and install.
diff --git a/control b/control
index 05569b7..210c472 100644
--- a/control
+++ b/control
@@ -1,11 +1,11 @@
Package: ted
-Version: 1.3r2
+Version: 2.0
Section: text
Priority: optional
Architecture: amd64
Essential: no
Maintainer: Pommicket <pommicket@gmail.com>
Description: A text editor.
-Installed-Size: 2144000
+Installed-Size: 2424832
Depends: libsdl2-2.0-0
Homepage: https://github.com/pommicket/ted
diff --git a/development.md b/development.md
new file mode 100644
index 0000000..7c643a2
--- /dev/null
+++ b/development.md
@@ -0,0 +1,13 @@
+(work in progress)
+
+## Releasing
+
+When releasing a new version of `ted`:
+
+- Update `TED_VERSION` in `ted.h`.
+- Update `Version` in `control` for the `.deb` file.
+- Run `make ted.deb` on Debian/Ubuntu.
+- Run `make.bat release` on Windows.
+- Open installer project, and increment version number.
+- Build `ted.msi`.
+- Create a new release on GitHub with `ted.deb` and `ted.msi`.
diff --git a/main.c b/main.c
index 3e947ae..818017e 100644
--- a/main.c
+++ b/main.c
@@ -368,6 +368,14 @@ int main(int argc, char **argv) {
switch (argc) {
case 0: case 1: break;
case 2:
+ if (streq(argv[1], "--help")) {
+ printf("%s\n", TED_VERSION_FULL);
+ printf("Usage: ted [file name]\n");
+ exit(0);
+ } else if (streq(argv[1], "--version")) {
+ printf("%s\n", TED_VERSION_FULL);
+ exit(0);
+ }
// essentially, replace / with \ on windows.
for (char *p = argv[1]; *p; ++p)
if (strchr(ALL_PATH_SEPARATORS, *p))
diff --git a/ted.c b/ted.c
index 5941f9a..8810d19 100644
--- a/ted.c
+++ b/ted.c
@@ -569,6 +569,7 @@ void ted_go_to_lsp_document_position(Ted *ted, LSP *lsp, LSPDocumentPosition pos
}
void ted_highlight_lsp_range(Ted *ted, TextBuffer *buffer, LSPRange range) {
+ (void)ted;
Font *font = buffer_font(buffer);
const u32 *colors = buffer_settings(buffer)->colors;
float char_height = font->char_height;
diff --git a/ted.h b/ted.h
index 0f2dfe6..45a9531 100644
--- a/ted.h
+++ b/ted.h
@@ -1,3 +1,5 @@
+#define TED_VERSION "2.0"
+#define TED_VERSION_FULL "ted v. " TED_VERSION
#define TED_PATH_MAX 256
#define TED_UNTITLED "Untitled" // what to call untitled buffers
#define TED_CFG "ted.cfg" // config filename