srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ipc
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2026-02-04 21:27:00 +0200
committersrdusr <[email protected]>2026-02-04 21:27:00 +0200
commitc39808cca65bb72211359f4d6be3ba869f0121e6 (patch)
tree1fd3e70fbe1a3e7e65bf0ff5359c96d8d6228e6a /internal/ipc
parentce6ce32469da720105258cb66e0274b2b009cd1d (diff)
downloadmitmux-c39808cca65bb72211359f4d6be3ba869f0121e6.tar.gz
mitmux-c39808cca65bb72211359f4d6be3ba869f0121e6.zip
Vi-modal editing for the raw request textareas
Started a broader pass to close the gap with Burp/ZAP/Caido (feature comparison researched, tracked in PLAN.md) and to fully support vi bindings as asked. This commit is the vi-bindings piece. Checked the actual bubbles library before writing anything: table and viewport already ship full vi navigation by default (h/j/k/l, ctrl+u/ ctrl+d, g/G) - nothing to build there. textarea and textinput are Emacs-style with no vi support at all, and textarea's own ctrl+p ("previous line") was silently shadowed by the ctrl+p shortcut I'd bound for Intruder's marker insertion - a real bug from the last session, fixed here by moving it to ctrl+g. vimode.go adds viTextarea, wrapping textarea.Model with a normal/insert modal layer. Vi commands are translated into the underlying textarea's own existing keybindings (a synthesized "alt+right" for `w`, "ctrl+k" for `d$`, etc.) and reuse its tested cursor/line logic rather than reimplementing text manipulation - this is a front-end over textarea, not a parser. Covers what's actually used constantly: h/j/k/l, 0/$, w/b, x, i/a/I/A/o/O, dd/yy/p/P, dw/d$/d0, gg/G, esc-to-normal (esc never leaves the view while still in insert mode, matching real vi). Not attempted: registers beyond one yank slot, visual mode, ex commands, macros, counts. No undo, since textarea itself has none. Starts in normal mode on focus, per vi convention - not insert. Replaces the three textarea.Model fields (Repeater's request editor, Intruder's template and payload editors) with viTextarea, and adds a vim-style mode indicator ("-- NORMAL --" / "-- INSERT --") to both views, without which modal editing is unusable - there'd be no way to tell which mode you're in. Verified live via a real session: normal-mode letters don't leak into the buffer as text, gg/x/dd/yy/p all produce the correct edits in sequence on a real captured request, i enters insert mode and typing works, esc from insert correctly drops to normal without leaving the view, a second esc then backs out, and ctrl+g inserts a marker without colliding with anything in the vi command set.
Diffstat (limited to 'internal/ipc')
0 files changed, 0 insertions, 0 deletions