Gap Buffer Memory Model for Ultra-Low Latency
O(1) insertion and deletion operations at the cursor position
Terminal editors often stutter when using linear string arrays for medium or large files. cmdit implements the Gap Buffer data structure: a contiguous memory block with a movable empty gap that travels with the cursor, ensuring instantaneous keystroke response.