30 Commits

Author SHA1 Message Date
128235283c bump version
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
1.3.0: mark/region
2025-11-24 21:41:04 -08:00
af3c0eddc4 set editor position 2025-11-24 21:38:04 -08:00
f8f01f7dd6 don't clear mark in kill/delete_region 2025-11-24 21:32:23 -08:00
8206ab0a40 fixed counting, I think 2025-11-24 21:21:37 -08:00
af8dcb847e working on delete-region 2025-11-24 21:14:56 -08:00
9434a34116 kill_region appears to work 2025-11-24 20:49:55 -08:00
3b2b60466c continuing region work 2025-11-24 20:27:30 -08:00
52e1f2dd8b Cleaning up; start mark/region work. 2025-11-24 20:07:15 -08:00
8bb9228339 clean asan logs 2025-11-24 19:17:06 -08:00
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
7 changed files with 1286 additions and 518 deletions

2
.gitignore vendored
View File

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

View File

@@ -2,15 +2,29 @@ cmake_minimum_required(VERSION 3.15)
project(ke C) # Specify C language explicitly
set(CMAKE_C_STANDARD 99)
set(KE_VERSION "1.0.10")
set(KE_VERSION "1.3.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")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
# 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(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}")
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)

27
Makefile Normal file
View File

@@ -0,0 +1,27 @@
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)
rm -f asan.log*
.PHONY: test.txt
test.txt:
cp test.txt.bak $@

View File

@@ -11,4 +11,8 @@ It should be available via homebrew, even:
brew tap kisom/homebrew-tap
brew install ke
Released under an ISC license.
To get verbose ASAN messages:
export LSAN_OPTIONS=verbosity=1:log_threads=1
Released under an ISC license.

4
ke.1
View File

@@ -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.
.It C-k 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.
.El
.Sh FIND

1728
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