# TextEditor Feature Checklist ## Normal Mode Motions ### Basic Movement - [x] `h` - Move left - [x] `j` - Move down - [x] `k` - Move up - [x] `l` - Move right ### Word Movement - [x] `w` - Forward to start of word - [x] `e` - Forward to end of word - [x] `b` - Backward to start of word - [x] `W` - Forward to start of WORD (whitespace-delimited) - [x] `E` - Forward to end of WORD - [ ] `B` - Backward to start of WORD - [ ] `ge` - Backward to end of word ### Line Movement - [x] `0` - Move to start of line - [x] `$` - Move to end of line - [x] `_` - Move to first non-whitespace - [x] `^` - Move to first non-whitespace (alias for `_`) - [x] `|` - Move to column N ### File Movement - [x] `G` - Move to bottom of file (or line N with count) - [x] `gg` - Move to top of file (or line N with count) - [ ] `H` - Move to top of screen - [ ] `M` - Move to middle of screen - [ ] `L` - Move to bottom of screen ### Scroll - [x] `ctrl+u` - Scroll up half page - [x] `ctrl+d` - Scroll down half page - [ ] `ctrl+b` - Scroll up full page - [ ] `ctrl+f` - Scroll down full page - [ ] `ctrl+y` - Scroll up one line - [ ] `ctrl+e` - Scroll down one line - [ ] `zz` - Center cursor on screen - [ ] `zt` - Scroll cursor to top - [ ] `zb` - Scroll cursor to bottom ### Search Movement - [x] `f{char}` - Find char forward on line - [x] `F{char}` - Find char backward on line - [x] `t{char}` - Till char forward on line - [x] `T{char}` - Till char backward on line - [x] `;` - Repeat last f/F/t/T - [x] `,` - Repeat last f/F/t/T reversed - [ ] `/` - Search forward - [ ] `?` - Search backward - [ ] `n` - Next search result - [ ] `N` - Previous search result - [ ] `*` - Search word under cursor forward - [ ] `#` - Search word under cursor backward ### Other Movement - [ ] `%` - Jump to matching bracket - [ ] `{` - Jump to previous paragraph - [ ] `}` - Jump to next paragraph - [ ] `(` - Jump to previous sentence - [ ] `)` - Jump to next sentence --- ## Operators ### Implemented - [x] `d` - Delete operator - [x] `y` - Yank operator - [x] `dd` - Delete line (double press) - [x] `yy` - Yank line (double press) ### Not Implemented - [x] `c` - Change operator - [x] `cc` - Change line - [ ] `>` - Indent right - [ ] `<` - Indent left - [ ] `=` - Auto-indent - [ ] `gq` - Format text - [ ] `gu` - Lowercase - [ ] `gU` - Uppercase - [ ] `g~` - Swap case - [ ] `!` - Filter through external command --- ## Actions ### Insert Mode Entry - [x] `i` - Insert before cursor - [x] `a` - Insert after cursor - [x] `I` - Insert at start of line - [x] `A` - Insert at end of line - [x] `o` - Open line below - [x] `O` - Open line above - [x] `s` - Substitute character (delete + insert) - [x] `S` - Substitute line (delete line + insert) - [x] `C` - Change to end of line - [ ] `gi` - Insert at last insert position ### Delete Actions - [x] `x` - Delete character under cursor - [x] `D` - Delete to end of line - [x] `X` - Delete character before cursor - [ ] `J` - Join lines - [ ] `gJ` - Join lines without space ### Yank/Paste - [x] `p` - Paste after cursor - [x] `P` - Paste before cursor - [ ] `gp` - Paste after and move cursor to end - [ ] `gP` - Paste before and move cursor to end ### Registers - [x] Unnamed register (`"`) - [x] Numbered registers (`0-9`) - [x] Register types (charwise, linewise, blockwise) - [ ] `"` - Register prefix (select register for next operation) - [ ] Named registers (`a-z`) - [ ] Append to named registers (`A-Z`) - [ ] Black hole register (`_`) - [ ] System clipboard (`+`, `*`) - [ ] Expression register (`=`) - [ ] Last search register (`/`) ### Undo/Redo - [ ] `u` - Undo - [ ] `ctrl+r` - Redo - [ ] `.` - Repeat last change - [ ] `U` - Undo all changes on line ### Other Normal Mode - [ ] `r{char}` - Replace character - [ ] `R` - Replace mode - [ ] `~` - Swap case of character - [ ] `ctrl+a` - Increment number - [ ] `ctrl+x` - Decrement number - [ ] `q{reg}` - Record macro - [ ] `@{reg}` - Play macro - [ ] `@@` - Repeat last macro - [x] `ctrl+c` - Quit (custom) --- ## Visual Mode ### Mode Entry - [x] `v` - Character-wise visual mode - [x] `V` - Line-wise visual mode - [x] `ctrl+v` - Block-wise visual mode - [ ] `gv` - Reselect last visual selection ### Visual Mode Operations - [x] Motions work in visual mode - [x] `d` / `x` - Delete selection - [x] `y` - Yank selection - [x] `c` - Change selection - [ ] `>` - Indent selection - [ ] `<` - Unindent selection - [ ] `=` - Auto-indent selection - [ ] `~` - Swap case of selection - [ ] `u` - Lowercase selection - [ ] `U` - Uppercase selection - [ ] `J` - Join selected lines - [ ] `o` - Go to other end of selection - [ ] `O` - Go to other corner (block mode) --- ## Insert Mode ### Text Input - [x] Character insertion - [x] `Enter` - Insert newline - [x] `Tab` - Insert tab/spaces - [x] `Backspace` - Delete character before cursor - [x] `Delete` - Delete character under cursor - [x] `ctrl+w` - Delete word before cursor ### Movement in Insert Mode - [x] Arrow keys (up/down/left/right) - [ ] `ctrl+h` - Backspace (alias) - [ ] `ctrl+j` - Insert newline (alias) - [ ] `ctrl+t` - Indent line - [ ] `ctrl+d` - Unindent line ### Exit Insert Mode - [x] `Esc` - Exit to normal mode - [ ] `ctrl+c` - Exit to normal mode - [ ] `ctrl+[` - Exit to normal mode --- ## Command Mode ### Entry/Exit - [x] `:` - Enter command mode - [x] `Esc` - Exit command mode - [x] `Enter` - Execute command ### Editing - [x] Character input - [x] `Backspace` - Delete character - [x] `Delete` - Delete character - [x] `ctrl+w` - Delete word - [x] `Left` / `Right` - Move cursor ### Commands Implemented - [x] `:set number` / `:set nonumber` - Toggle line numbers - [x] `:set number!` - Toggle line numbers - [x] `:set tabstop=N` - Set tab width - [x] `:register {name}` - Show register contents - [x] `:w` - Write file - [x] `:q` - Quit - [x] `:wq` - Write and quit - [x] `:q!` - Force quit - [x] `:e {file}` - Edit file - [x] `:bn` / `:bp` - Next/previous buffer - [ ] `:{range}` - Go to line - [ ] `:%s/old/new/g` - Search and replace - [ ] `:!{cmd}` - Run shell command - [ ] `:help` - Show help --- ## Text Objects ### Not Implemented - [ ] `iw` / `aw` - Inner/around word - [ ] `iW` / `aW` - Inner/around WORD - [ ] `is` / `as` - Inner/around sentence - [ ] `ip` / `ap` - Inner/around paragraph - [ ] `i"` / `a"` - Inner/around double quotes - [ ] `i'` / `a'` - Inner/around single quotes - [ ] `` i` `` / `` a` `` - Inner/around backticks - [ ] `i(` / `a(` - Inner/around parentheses - [ ] `i[` / `a[` - Inner/around brackets - [ ] `i{` / `a{` - Inner/around braces - [ ] `i<` / `a<` - Inner/around angle brackets - [ ] `it` / `at` - Inner/around tag --- ## Marks & Jumps ### Not Implemented - [ ] `m{a-z}` - Set local mark - [ ] `m{A-Z}` - Set global mark - [ ] `` `{mark} `` - Jump to mark (exact position) - [ ] `'{mark}` - Jump to mark (line start) - [ ] ``` `` ``` - Jump to previous position - [ ] `''` - Jump to previous line - [ ] `` `. `` - Jump to last change - [ ] `ctrl+o` - Jump back in jump list - [ ] `ctrl+i` - Jump forward in jump list --- ## Buffers Buffers are in-memory representations of files. A buffer exists for each open file. ### Buffer Model - [x] Buffer struct (id, filename, lines, modified flag, cursor position) - [x] Buffer list/manager - [x] Current buffer tracking - [ ] Buffer-local settings (tabstop, filetype, etc.) - [x] Modified/dirty state tracking - [x] Read-only buffer support ### Buffer Navigation - [x] `:e {file}` - Edit file (open in new buffer or switch to existing) - [x] `:bn` / `:bnext` - Next buffer - [x] `:bp` / `:bprev` - Previous buffer - [x] `:b {name}` - Switch to buffer by name (partial match) - [x] `:b {number}` - Switch to buffer by number - [x] `:bf` / `:bfirst` - First buffer - [x] `:bl` / `:blast` - Last buffer - [x] `:buffers` / `:ls` - List all buffers - [ ] `ctrl+^` / `ctrl+6` - Switch to alternate (previous) buffer ### Buffer Operations - [x] `:bd` / `:bdelete` - Delete buffer (close file) - [x] `:bd!` - Force delete buffer (discard changes) - [ ] `:bw` / `:bwipeout` - Wipe buffer (remove completely) - [x] `:w` - Write current buffer to file - [x] `:w {file}` - Write buffer to specific file - [x] `:wa` - Write all modified buffers - [ ] `:sav {file}` - Save as (write to new file, switch to it) ### Buffer State - [ ] Track cursor position per buffer - [ ] Track undo history per buffer - [ ] Track marks per buffer - [ ] Remember scroll position when switching - [ ] Alternate buffer (`#`) tracking ### Buffer Indicators - [x] `%` - Current buffer (in buffer list) - [ ] `#` - Alternate buffer - [ ] `a` - Active (loaded and visible) - [ ] `h` - Hidden (loaded but not visible) - [x] `l` - Loaded (active and hidden do not exist yet) - [x] `+` - Modified - [x] `-` - Read-only - [ ] `=` - Readonly (cannot be modified) (?) ### Hidden Buffers - [ ] `:set hidden` - Allow switching with unsaved changes - [x] Prompt to save when closing modified buffer - [x] `:q` behavior with modified buffers ### Argument List (Advanced) - [ ] `:args` - Show argument list - [ ] `:next` / `:prev` - Navigate argument list - [ ] `:argadd` / `:argdelete` - Modify argument list --- ## Plugins / Extensions ### Harpoon (File Navigation) - [ ] Quick file marks (1-4 files) - [ ] Add file to list - [ ] Navigate to marked file - [ ] Show file list ### Telescope / Fuzzy Finder - [ ] File picker - [ ] Buffer picker - [ ] Grep/search - [ ] Command palette ### File Explorer - [ ] Tree view - [ ] File operations (create, delete, rename) - [ ] Navigation ### LSP Support - [ ] Go to definition - [ ] Find references - [ ] Hover information - [ ] Diagnostics - [ ] Code actions - [ ] Completion ### Git Integration - [ ] Git status - [ ] Git diff - [ ] Git blame - [ ] Hunk navigation ### Other - [ ] Multiple cursors - [ ] Snippets - [ ] Auto-pairs (brackets, quotes) - [ ] Surround (change surrounding chars) - [ ] Comment toggle - [ ] Indentation guides - [ ] Syntax highlighting - [ ] Statusline customization - [ ] Themes --- ## Editor Features ### Display - [x] Line numbers - [x] Cursor position tracking - [x] Viewport/scrolling - [x] ScrollOff setting - [x] Relative line numbers - [ ] Cursor line highlight - [ ] Column highlight - [ ] Wrap/nowrap - [ ] Word wrap at window edge - [ ] Show whitespace characters - [ ] Color column (ruler) ### Files - [x] File reading - [x] File writing - [ ] Auto-save - [ ] Backup files - [ ] Swap files - [ ] File encoding - [ ] Line endings (LF/CRLF) ### Search & Replace - [ ] Incremental search - [ ] Search highlighting - [ ] Case sensitivity options - [ ] Regex support - [ ] Search and replace ### Misc - [ ] Split windows - [ ] Tabs - [ ] Sessions - [ ] Persistent undo - [ ] Spell check --- ### Well Tested - Editor Core #### Command Execution (179 tests) - [x] Command parsing and validation - [x] Command lookup and prefix matching - [x] Force flag handling (!) - [x] Write commands (`:w`, `:w {file}`, `:w!`) - [x] Write all commands (`:wa`, `:wall`, `:wa!`) - [x] Quit commands (`:q`, `:q!`, `:qa`, `:qa!`) - [x] Write-quit commands (`:wq`, `:wq!`, `:wqa`, `:wqa!`) - [x] Edit command (`:e {file}`) - [x] Register display (`:register`, `:reg {name}`) - [x] Set commands (`:set number`, `:set tabstop=N`, etc.) - [x] Setting lookup and validation - [x] Buffer-level readonly protection - [x] Scratch buffer write protection - [x] Force write bypassing readonly/scratch checks - [x] Multiple buffer write operations - [x] File write error handling (permissions, paths) - [x] Modified buffer tracking - [x] Unicode filename and content handling - [x] Edge cases (empty args, long filenames, special chars) #### Program Initialization (70 tests) - [x] Empty program creation - [x] File program with nonexistent files (new file buffers) - [x] File program with existing files (content loading) - [x] Line ending handling (Unix `\n`, Windows `\r\n`, mixed) - [x] Tab to space conversion based on TabStop - [x] Unicode content preservation (CJK, emoji) - [x] File extension and type detection - [x] Buffer state initialization (flags, metadata) - [x] Large file handling (10,000+ lines) - [x] Long line handling (10,000+ chars) - [x] Empty file handling - [x] Builder pattern method chaining - [x] Program option accumulation - [x] Model state defaults (settings, registers, mode) - [x] Error handling (permissions, invalid paths) - [x] Integration workflows (end-to-end) - [x] Edge cases (empty filenames, relative paths, dot files) ### Moderately Tested - [x] Basic motions (h, j, k, l) - [x] Word motions (w, e, b) - [x] Jump motions (G, gg, 0, $, _, ^, |) - [x] Scroll actions (ctrl+u, ctrl+d) - [x] Delete operator (d, dd) - [x] Yank operator (y, yy) - [x] Paste actions (p, P) - [x] Change operator (c, cc, C) - [x] Substitute action (s, S) - [x] Insert mode entry (i, a, I, A, o, O) - [x] Insert mode editing (enter, backspace, delete, tab, ctrl+w) - [x] Visual modes (v, V, ctrl+v) - [x] Visual mode with motions - [x] Delete actions (x, D) - [x] Register behavior