Skip to content

joseCarlosAndrade/jim-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jim

A small terminal text editor written in Go, inspired by vim/kilo. Built for daily use from the shell.

Build

go build -o jim ./cmd

Works on Linux and macOS.

Usage

jim                 # empty buffer [No Name]
jim path/to/file    # open a file

Keybindings

Key Action
Arrows Move cursor
Typing Insert text
Enter New line
Tab Insert tab
Backspace Delete before cursor
Delete Delete at cursor
Ctrl+S Save (requires filename from CLI)
Ctrl+N New empty buffer
Ctrl+T Cycle status-bar animation
Ctrl+Q / Ctrl+D Quit (press twice if unsaved)

Status bar

  • Left: [+] filename when modified, else padded filename
  • Right: Ln Nfile line (1-based, by \n), not wrap row
  • Far right: animation glyph

Architecture

See specs/spec-ai-v3.md for MVP decisions and docs/spec-editor-viewport.md for viewport contracts.

Tests

go test ./...

Large files

Text is stored in a linked list of gap buffers (1 KiB chunks). Rendering uses a lazy wrap-line cache that only scans far enough to paint the visible viewport — it does not flatten the whole file each keystroke.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages