1 Commits

Author SHA1 Message Date
734eb6e67d ke version 2.0
Some checks failed
Release / Bump Homebrew formula (push) Has been cancelled
- with multiple buffers
- some handy tab completion
- lots of cleanups
2025-11-28 02:52:24 -08:00
4 changed files with 11 additions and 6 deletions

View File

@@ -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.5.6")
set(KE_VERSION "2.0.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")

View File

@@ -418,6 +418,7 @@ buffer_close_current(void)
int target = 0;
int nb = 0;
/* sanity check */
if (editor.curbuf < 0 || editor.curbuf >= editor.bufcount) {
editor_set_status("No buffer to close.");
return;

View File

@@ -43,7 +43,6 @@ void buffer_prev(void);
void buffer_switch_by_name(void);
void buffer_close_current(void);
const char *buffer_name(buffer *b);
/* Helpers */
int buffer_is_unnamed_and_empty(const buffer *b);

13
ke.1
View File

@@ -32,8 +32,11 @@ Toggle the mark.
If the mark is set, unindent the region.
.It C-k =
If the mark is set, indent the region.
.It C-k b
Switch to a buffer.
.It C-k c
Clear (flush) the kill ring.
Close the current buffer. If no other buffers are open, an empty
buffer will be opened. To exit, use C-k q.
.It C-k d
Delete from the cursor to the end of the line.
.It C-k C-d
@@ -41,7 +44,7 @@ Delete the entire line.
.It C-k e
Edit a new file. Also C-k C-e.
.It C-k f
Incremental find.
Flush the kill ring.
.It C-k g
Go to a specific line.
.It C-k j
@@ -50,6 +53,8 @@ Jump to the mark.
List the number of lines of code in a saved file.
.It C-k m
Run make(1).
.It C-k p
Switch to the next buffer.
.It C-k q
Exit the editor. If the file has unsaved changes,
a warning will be printed; a second C-k q will exit.
@@ -60,9 +65,9 @@ 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 u
Undo changes.
Undo changes (not implemented; marking this k-command as taken).
.It C-k U
Redo changes.
Redo changes (not implemented; marking this k-command as taken).
.It C-k x
save the file and exit. Also C-k C-x.
.It C-k y