feat(tui): implement Emacs-style kill ring for Editor
Add kill ring functionality with: - Ctrl+W/U/K save deleted text to kill ring - Ctrl+Y yanks (pastes) most recent deletion - Alt+Y cycles through kill ring (after Ctrl+Y) - Consecutive deletions accumulate into single entry
This commit is contained in:
committed by
Mario Zechner
parent
bafddc27ed
commit
9fb7434a06
@@ -34,6 +34,9 @@ export type EditorAction =
|
||||
| "selectCancel"
|
||||
// Clipboard
|
||||
| "copy"
|
||||
// Kill ring
|
||||
| "yank"
|
||||
| "yankPop"
|
||||
// Tool output
|
||||
| "expandTools";
|
||||
|
||||
@@ -81,6 +84,9 @@ export const DEFAULT_EDITOR_KEYBINDINGS: Required<EditorKeybindingsConfig> = {
|
||||
selectCancel: ["escape", "ctrl+c"],
|
||||
// Clipboard
|
||||
copy: "ctrl+c",
|
||||
// Kill ring
|
||||
yank: "ctrl+y",
|
||||
yankPop: "alt+y",
|
||||
// Tool output
|
||||
expandTools: "ctrl+o",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user