Skip to content

euxaristia/videre

Repository files navigation

videre

videre is a fast, modal terminal editor with a vi-first workflow and minimal runtime dependencies.

The current codebase is an idiomatic Swift 6.3 package. It keeps the editor's byte-oriented buffer model, modal command surface, and custom terminal layer while using Swift Package Manager for builds and tests.

Why videre

  • Modal editing that stays close to vi muscle memory
  • Tight terminal feedback with a low-friction UI
  • Single-binary workflow with simple build/run/install paths
  • Practical feature set: motions, visual selections, search, marks, yoinks, paste, and command mode
  • Dependency-light Swift implementation built around explicit value types and a small POSIX terminal bridge

Features

  • Modes: Normal, Insert, Replace, Visual, Visual Line, and : command entry
  • Navigation: hjkl, arrows, word motions, paragraph motions, %, gg, G, {n}G
  • Editing: i a I A o O, x, d, y, c with operator+motion forms and count prefixes
  • Search: /, n, N, f/F/t/T, ;, ,
  • Commands: :w, :q, :q!, :qa!, :wq, :e <file>, :{number}, :help
  • Extras: clipboard integration, syntax highlighting, Git branch status, auto-indent, auto-pairs, dot repeat, jumplist, and surround editing

Build

swift build -c release

The binary will be located at .build/release/videre.

Run

swift run videre path/to/file

Install

swift build -c release
install -m 0755 .build/release/videre ~/.local/bin/videre

Adjust the install destination to a directory on your PATH.

Test

swift test

Project Layout

  • Package.swift: Swift package manifest
  • Sources/videre/main.swift: Application entrypoint and lifecycle
  • Sources/Videre/Editor.swift: Core editor state and text manipulation logic
  • Sources/Videre/Input.swift: Modal key handling and command dispatch
  • Sources/Videre/UI.swift: Terminal rendering and screen management
  • Sources/Videre/Terminal.swift: POSIX raw mode, ANSI output, and key parsing
  • Sources/Videre/Syntax.swift: Lightweight syntax highlighting
  • Sources/Videre/ByteRegex.swift: Byte-oriented regex/search engine
  • Tests/VidereTests: XCTest coverage for editor behavior
  • videre.1: man page

Notes

  • Linux and macOS terminals are the primary targets.
  • On crash or hard kill, restore terminal state with reset or stty sane.

License

Unlicense. See LICENSE.

About

videre is a fast, modal terminal editor with a vi-first workflow and minimal runtime dependencies

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors