Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 329b92f382 | |||
| 12553f301b | |||
| 75b19042b9 | |||
| 1a184b1a08 | |||
| acde895fb7 | |||
| 78d522ba98 | |||
| feb6667a24 | |||
|
|
66c79e0762 | ||
| a51b98c31f | |||
| 707362574c | |||
| 56db8bd8d2 | |||
| a32ef2ff53 | |||
| 0c0c3d9ce5 | |||
| 7245003769 | |||
| 542b1d90a0 | |||
| a359f4e6c4 |
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15)
|
||||
project(ke C) # Specify C language explicitly
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(KE_VERSION "1.3.2")
|
||||
set(KE_VERSION "1.4.0")
|
||||
|
||||
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")
|
||||
|
||||
8
Makefile
8
Makefile
@@ -3,8 +3,9 @@ KE_VERSION := devel
|
||||
DEST := $(HOME)/.local/bin/$(TARGET)
|
||||
|
||||
CFLAGS := -Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g
|
||||
CFLAGS += -Wno-unused-result
|
||||
CFLAGS += -D_DEFAULT_SOURCE -D_XOPEN_SOURCE
|
||||
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
||||
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
||||
|
||||
LDFLAGS := -fsanitize=address
|
||||
|
||||
@@ -25,3 +26,8 @@ clean:
|
||||
.PHONY: test.txt
|
||||
test.txt:
|
||||
cp test.txt.bak $@
|
||||
|
||||
.PHONY: gdb
|
||||
gdb:
|
||||
@test -f $(TARGET).pid || (echo "error: $(TARGET).pid not found" >&2; exit 1)
|
||||
@gdb -p $$(cat $(TARGET).pid | tr -d ' \t\n\r') ./$(TARGET)
|
||||
|
||||
@@ -16,3 +16,6 @@ To get verbose ASAN messages:
|
||||
export LSAN_OPTIONS=verbosity=1:log_threads=1
|
||||
|
||||
Released under an ISC license.
|
||||
|
||||
Started by following along with kilo:
|
||||
https://viewsourcecode.org/snaptoken/kilo/
|
||||
|
||||
21
default.nix
21
default.nix
@@ -1,16 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
cmake,
|
||||
installShellFiles,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "ke";
|
||||
version = "1.3.2";
|
||||
version = "1.4.0";
|
||||
|
||||
src = lib.cleanSource ./.;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_ASAN=on"
|
||||
"-DCMAKE_BUILD_TYPE=Debug"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@@ -18,10 +27,8 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/bin
|
||||
cp ke $out/bin/
|
||||
|
||||
installManPage ../ke.1
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installManPage ke.1
|
||||
'';
|
||||
}
|
||||
|
||||
22
ke.1
22
ke.1
@@ -22,9 +22,12 @@ grandeur. Many commands work with and without control; for example,
|
||||
saving a file can be done with either C-k s or C-k C-s. Other commands work
|
||||
with ESC or CTRL.
|
||||
.Sh K-COMMANDS
|
||||
k-command mode can be exited with ESC or C-g.
|
||||
.Bl -tag -width xxxxxxxxxxxx -offset indent
|
||||
.It C-k BACKSPACE
|
||||
Delete from the cursor to the beginning of the line.
|
||||
.It C-k c
|
||||
Clear (flush) the kill ring.
|
||||
.It C-k SPACE
|
||||
Toggle the mark.
|
||||
.It C-k d
|
||||
@@ -36,24 +39,33 @@ Edit a new file. Also C-k C-e.
|
||||
.It C-k f
|
||||
Incremental find.
|
||||
.It C-k g
|
||||
Go to a specific line. Also C-k C-g.
|
||||
Go to a specific line.
|
||||
.It C-k j
|
||||
Jump to the mark.
|
||||
.It C-k l
|
||||
List the number of lines of code in a saved file.
|
||||
.It C-k m
|
||||
Run make(1).
|
||||
.It C-k q
|
||||
exit the editor. Also C-k C-q.
|
||||
Exit the editor. If the file has unsaved changes,
|
||||
a warning will be printed; a second C-k q will exit.
|
||||
.It C-k C-q
|
||||
Immediately exit the editor.
|
||||
.It C-k C-r
|
||||
Reload the current buffer from disk.
|
||||
.It C-k s
|
||||
save the file, prompting for a filename if needed. Also C-k C-s.
|
||||
.It C-k x
|
||||
save the file and exit. Also C-k C-x.
|
||||
.It C-k y
|
||||
Yank the killring.
|
||||
Yank the kill ring.
|
||||
.It C-k \[char92]
|
||||
Dump core.
|
||||
.El
|
||||
.Sh OTHER KEYBINDINGS
|
||||
.Bl -tag -width xxxxxxxxxxxx -offset indent
|
||||
.It C-g
|
||||
In general, C-g cancels an operation.
|
||||
.It C-l
|
||||
Refresh the display.
|
||||
.It C-s
|
||||
@@ -61,7 +73,7 @@ Incremental find.
|
||||
.It C-w
|
||||
Kill the region if the mark is set.
|
||||
.It C-y
|
||||
Yank the killring.
|
||||
Yank the kill ring.
|
||||
.It ESC BACKSPACE
|
||||
Delete the previous word.
|
||||
.It ESC b
|
||||
@@ -71,7 +83,7 @@ Delete the next word.
|
||||
.It ESC f
|
||||
Move to the next word.
|
||||
.It ESC w
|
||||
Save the region (if the mark is set) to the killring.
|
||||
Save the region (if the mark is set) to the kill ring.
|
||||
.It
|
||||
.El
|
||||
.Sh FIND
|
||||
|
||||
Reference in New Issue
Block a user