hackable-pager is a small pager written in C using ncurses.
This project is a minimal text/code viewer that:
- reads a file line by line into memory
- renders it manually using ncurses
- allows scrolling
- applies very basic C syntax highlighting
I just wanted to make a pager in C... However, the possible uses I think this has are:
- A kernel for an advanced pager OR text/code editor
- Learning ncurses
- Messing around
- Full-screen ncurses rendering
- Vertical scrolling
j/k- arrow keys
- Fixed-width line number gutter
- Very basic C syntax highlighting:
- keywords
- string literals
//line comments
- Straightforward codebase
You’ll need ncurses installed.
gcc pager.c -lncurses -o pager./pager [path/to/.c/fileControls:
- j / ↓ — scroll down
- k / ↑ — scroll up
- q — quit
