-
F- Follow mode (liketail -f, auto-scroll as file grows) -
r/R- Repaint/refresh screen -
z- Forward one window (with optional count) -
w- Backward one window -
e- Forward one line (alias forj) -
y- Backward one line (alias fork)
-
?- Search backward -
&pattern- Show only lines matching pattern (filter mode) -
ESC-u- Toggle search highlighting
-
m+ letter - Set a mark at current position -
'+ letter - Jump to a mark -
''- Return to previous position before last jump
-
:d- Remove current file from buffer list -
:x- Go to first file in buffer list
-
-i- Ignore case in search -
-I- Ignore case even when pattern has uppercase -
-N- Toggle line numbers -
-S- Toggle line wrap (chop long lines)
-
v- Open current file in$EDITOR -
h- Help screen (less standard, we have F1)
-
-N/--LINE-NUMBERS- Show line numbers -
-S/--chop-long-lines- Don't wrap, truncate long lines -
-R/--RAW-CONTROL-CHARS- Interpret ANSI color escape codes -
-X/--no-init- Don't clear screen on exit -
-x N/--tabs=N- Set tab width
-
-i/--ignore-case- Ignore case in searches -
-I/--IGNORE-CASE- Ignore case even if pattern has uppercase -
-p pattern- Start at first occurrence of pattern -
+/pattern- Same as-p
-
-F/--quit-if-one-screen- Quit if content fits on one screen -
-e/--quit-at-eof- Quit at second EOF -
-E/--QUIT-AT-EOF- Quit at first EOF -
-q/--quiet/--silent- No terminal bell -
+F- Start in follow mode -
+G- Start at end of file
-
-M/--LONG-PROMPT- Verbose prompt with line numbers/percentage -
-m/--long-prompt- Medium verbosity prompt
Currently bless reads entire files into memory (os.ReadFile), which fails for large files (100M+ lines). Need to implement lazy loading like less.
- Build index of byte offsets for line starts
- Use sparse index (every Nth line) for memory efficiency
- Enable O(log n) jumping to any line number
- Incremental index building (don't block on startup)
- Memory-map files instead of reading entirely
- Load only visible lines + buffer region
- LRU cache for recently viewed chunks
- Re-read from disk when scrolling to new regions
- Decouple viewport from full document storage
- Only materialize text for visible lines
- Handle word-wrap calculation without full content
- Buffer stdin to temp file for random access
- Support seeking in piped content
- Size limits / warnings for huge streams
- Open 1GB+ files instantly (index in background)
- Smooth scrolling regardless of file size
- Memory usage proportional to viewport, not file size
High impact features to implement first:
Follow mode ((DONE)F) - Essential for log files- Backward search (
?) - Common navigation pattern - Marks (
m/') - Power user feature for large files - Case-insensitive search toggle (
-i) - Very frequently needed - Filter mode (
&) - Useful for log analysis
-N- Line numbers (common use case)-S- Chop long lines (essential for wide content)-i- Case-insensitive search (very common)-F- Quit if one screen (used in scripts/pipes)+F- Start in follow mode (log file monitoring)-R- Raw ANSI codes (colored output from commands)