Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gaurav-Gosain/tuios/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TUIOS provides a powerful Vim-style copy mode for navigating terminal scrollback and selecting text. With a 10,000 line scrollback buffer, you can review command output, search through logs, and copy text using familiar Vim motions.Copy mode is inspired by tmux’s copy mode and Vim’s navigation, making it instantly familiar to terminal power users.
Key Features
10,000 Line Buffer
Massive scrollback history for reviewing logs and output
Vim Motions
Navigate with h/j/k/l, w/b, gg/G, and more
Search & Highlight
Forward/backward search with regex support and n/N navigation
Visual Selection
Character and line-wise visual modes for precise copying
Entering Copy Mode
From any mode, use the leader key:Basic Navigation
Once in copy mode, use Vim-style motions:Character Movement
Word Movement
word (lowercase) treats punctuation as boundaries. WORD (uppercase) only splits on whitespace.Example:
foo-bar is two words but one WORD.Line Movement
File-Level Navigation
Screen Navigation
Paragraph Movement
Count Prefix
Prefix any motion with a number to repeat it:Character Search
Find characters on the current line (like Vim’s f/F/t/T):Example
Search
Search across all scrollback lines:Search Workflow
Search Examples
Search is case-sensitive by default. The search pattern supports regular expressions.
Visual Selection
Select text for copying:Character-Wise Visual Mode
Line-Wise Visual Mode
Selection Workflow
Visual mode indicators:
-- VISUAL --for character-wise-- VISUAL LINE --for line-wise
Other Commands
Scrollback Buffer Configuration
The scrollback buffer size is configurable:Via Config File
Edit~/.config/tuios/config.toml:
Via CLI Flag
Practical Examples
Reviewing Build Output
Extracting Log Lines
Copying Command Output
Navigating Long Help Text
Mouse Support
Copy mode also supports mouse interactions:- Click: Move cursor to clicked position
- Click and drag: Start visual selection at click point and extend to drag endpoint
- Scroll wheel: Scroll up/down through history
Implementation Details
Source Code
Copy mode is implemented across several files ininternal/input/:
copymode_handlers.go- Main dispatcher and mode switchingcopymode_motion.go- Movement commands (h/j/k/l, w/b, gg/G)copymode_search.go- Search functionality and highlightingcopymode_visual.go- Visual selection modescopymode_char_search.go- Character find commands (f/F/t/T)
internal/app/render_scrollback_browser.go
Memory Management
Scrollback buffer uses a ring buffer for efficiency:- Fixed size (10,000 lines default)
- Oldest lines are overwritten when buffer is full
- Each line stores: cells (char + style), line attributes, wrap state
- Per-window buffer (not shared)
Performance
Copy mode rendering is optimized:- Viewport culling: Only visible lines are rendered
- Line caching: Unchanged lines are cached
- Search highlighting is computed once and cached
- Mouse event throttling prevents excessive updates
Keybinding Reference
Basic Movement
Basic Movement
h/j/k/l- Left/Down/Up/Right- Arrow keys - Same as hjkl
w/b/e- Word forward/backward/endW/B/E- WORD forward/backward/end
Line Navigation
Line Navigation
File Navigation
File Navigation
Screen Navigation
Screen Navigation
Character Search
Character Search
f{char}- Find next charF{char}- Find previous chart{char}- Till (before) next charT{char}- Till (after) previous char;- Repeat last search,- Repeat opposite direction
Search
Search
/- Search forward?- Search backwardn- Next matchN- Previous matchCtrl+L- Clear highlights
Visual Selection
Visual Selection
v- Visual character modeV- Visual line modeyorc- Yank (copy) selectionEscorq- Exit visual mode
Other
Other
%- Jump to matching bracketi- Exit to terminal modeqorEsc- Exit copy mode
Troubleshooting
Can’t Enter Copy Mode
Cause: No terminal window focused. Solution: Make sure you’re in Window Management Mode and a window is focused. PressEsc to ensure you’re in Window Management Mode, then try Ctrl+B [.
Search Not Finding Text
Cause 1: Text is outside scrollback buffer (older than 10,000 lines). Solution: Increase scrollback buffer size (see Configuration). Cause 2: Search is case-sensitive. Solution: Use lowercase search or regex patterns like/[Ee]rror.
Copied Text Not in Clipboard
Cause: System clipboard integration depends on terminal emulator. Solution: Ensure your terminal supports OSC 52 escape sequences for clipboard access. Most modern terminals (kitty, Alacritty, iTerm2, WezTerm) support this.Copy Mode Slow with Large Buffer
Cause: 10,000+ line buffer with complex styling. Solution: Reduce scrollback buffer size for better performance:Mouse Selection Not Working
Cause: Mouse mode disabled in terminal. Solution: TUIOS requires terminal mouse mode. Most modern terminals enable this by default. Check your terminal’s settings.Related Documentation
- Keybindings - Complete keybinding reference
- Configuration - Customize scrollback buffer size
- Sessions - Scrollback persists in daemon mode
Comparison with Other Tools
Copy Mode vs. tmux Copy Mode
TUIOS copy mode is inspired by tmux but includes:- Larger default buffer (10,000 vs tmux’s 2,000)
- Regex search built-in
- Mouse support for visual selection
- Per-window scrollback (not shared across panes)
Copy Mode vs. less/more
TUIOS copy mode provides:- Vim-style navigation (not just arrow keys)
- Visual selection for copying
- Persistent across commands (doesn’t clear when command exits)
- Integrated with window manager (no separate pager process)