29 Commits

Author SHA1 Message Date
e937e3398c Dumb typo.
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-24 14:41:11 -08:00
f147c866ab v1.2.0 with basic killring.
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-24 14:37:33 -08:00
1227d0abf4 Support basic killing/yanking. 2025-11-24 14:35:44 -08:00
d3591331a5 Update man page with yank. 2025-11-24 14:03:12 -08:00
5eafc1a34b local install in Makefile 2025-11-24 13:57:10 -08:00
a0103dd5aa Start killring work. 2025-11-24 13:46:00 -08:00
3782880062 UTF-8 support. 2025-11-24 13:11:24 -08:00
e345b55595 Fix version number
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-24 11:05:51 -08:00
d1978a3b98 Code cleanups and editor fixups.
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-24 10:54:48 -08:00
5ee8234ab7 Update the manpage.
Print the core dump k-command correctly.
2025-11-24 10:23:39 -08:00
f82d1f8831 move nix to nixos config 2025-11-24 10:22:48 -08:00
2019ec10ce local testing updates 2025-11-23 19:15:19 -08:00
0110f82705 bump version
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-23 14:26:17 -08:00
a62a8e50fa find_prev_word and delete_prev_word work. 2025-11-23 14:24:49 -08:00
33e19e7d76 add Makefile for basic build 2025-11-23 11:48:46 -08:00
fd01e3593f delete next word complete, delete prev in progress. 2025-11-23 11:48:35 -08:00
47bbc5339c forward/backward word. 2025-11-23 00:19:25 -08:00
2962a6c92e start word nav 2025-11-22 23:31:49 -08:00
7fa887273b move nix to nixos config 2025-11-22 23:31:49 -08:00
fb02f37512 make ASan a compile time option 2025-11-22 23:27:34 -08:00
1722dbee0b Fix check for render realloc. 2025-11-22 12:50:22 -08:00
14199afeb5 bump version
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 12:36:41 -08:00
9f3558c430 put it in build, not build/bin
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 12:27:02 -08:00
ce64e4637d clean up 2025-11-22 12:15:53 -08:00
36013e42e4 version bump
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 12:13:56 -08:00
dd667c1ef5 revert back to older version with some previous fixes
the ai was getting wild
2025-11-22 12:13:03 -08:00
c9977b0fc0 checkpoint
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 12:00:50 -08:00
dd2c888766 update man page
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 01:48:31 -08:00
2967998893 Update README
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
2025-11-22 01:45:59 -08:00
7 changed files with 663 additions and 196 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
*.log *.log
build build
ke
*.txt

View File

@@ -2,20 +2,29 @@ cmake_minimum_required(VERSION 3.15)
project(ke C) # Specify C language explicitly project(ke C) # Specify C language explicitly
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(KE_VERSION "1.0.4") set(KE_VERSION "1.2.1")
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g") 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") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")
# Optionally enable AddressSanitizer (ASan)
option(ENABLE_ASAN "Enable AddressSanitizer for builds" OFF)
if (ENABLE_ASAN)
message(STATUS "ASan enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
# Ensure the sanitizer is linked too (especially important on some platforms)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
endif()
include(GNUInstallDirs)
# Add executable # Add executable
add_executable(ke main.c) add_executable(ke main.c)
# Define KE_VERSION for use in C code (e.g., #define KE_VERSION)
target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}") target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}")
install(TARGETS ke RUNTIME DESTINATION bin)
install(FILES ke.1 TYPE MAN)
install(TARGETS ke RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ke.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
# Set output properties
set_target_properties(ke PROPERTIES
FOLDER bin
RUNTIME_OUTPUT_DIRECTORY bin
)

26
Makefile Normal file
View File

@@ -0,0 +1,26 @@
TARGET := ke
KE_VERSION := devel
DEST := $(HOME)/.local/bin/$(TARGET)
CFLAGS := -Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g
CFLAGS += -D_DEFAULT_SOURCE -D_XOPEN_SOURCE
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
LDFLAGS := -fsanitize=address
all: $(TARGET) test.txt
$(TARGET): main.c
$(CC) $(CFLAGS) -o $(TARGET) $(LDFLAGS) main.c
.PHONY: install
#install: $(TARGET)
install:
cp $(TARGET) $(DEST)
clean:
rm -f $(TARGET)
.PHONY: test.txt
test.txt:
cp test.txt.bak $@

View File

@@ -6,6 +6,13 @@ used fairly often.
See the man page for more info. See the man page for more info.
It should be available via homebrew, even. It should be available via homebrew, even:
brew tap kisom/homebrew-tap
brew install ke
To get verbose ASAN messages:
export LSAN_OPTIONS=verbosity=1:log_threads=1
Released under an ISC license. Released under an ISC license.

8
ke.1
View File

@@ -24,10 +24,10 @@ saving a file can be done with either C-k s or C-k C-s.
.Bl -tag -width xxxxxxxxxxxx -offset indent .Bl -tag -width xxxxxxxxxxxx -offset indent
.It C-k BACKSPACE .It C-k BACKSPACE
Delete from the cursor to the beginning of the line. Delete from the cursor to the beginning of the line.
.It C-k C-d
Delete the current row.
.It C-k d .It C-k d
Delete from the cursor to the end of the line. Delete from the cursor to the end of the line.
.It C-k C-d
Delete the entire link.
.It C-k e .It C-k e
Edit a new file. Also C-k C-e. Edit a new file. Also C-k C-e.
.It C-k f .It C-k f
@@ -42,7 +42,9 @@ exit the editor. Also C-k C-q.
save the file, prompting for a filename if needed. Also C-k C-s. save the file, prompting for a filename if needed. Also C-k C-s.
.It C-k x .It C-k x
save the file and exit. Also C-k C-x. save the file and exit. Also C-k C-x.
.It C-k \ .It C-k y
Yank the killring.
.It C-k \[char92]
Dump core. Dump core.
.El .El
.Sh FIND .Sh FIND

722
main.c

File diff suppressed because it is too large Load Diff

15
test.txt.bak Normal file
View File

@@ -0,0 +1,15 @@
hello
world it is me
but I am not me