Snap your prose into
clean, diff-friendly lines

A fast, format-aware semantic line break formatter for academic papers and collaborative writing.

One sentence, one line

Traditional wrapping hides changes in paragraph-wide diffs. Snapper breaks at sentence boundaries so every edit shows exactly what changed.

Before (traditional wrapping) We present a method for formatting prose documents with semantic line breaks, where each sentence occupies its own line. This approach dramatically reduces noise in version control diffs when multiple authors collaborate on a manuscript. Our tool handles LaTeX, Org-mode, Markdown, and plaintext with format-aware parsing that preserves structural elements.
After (snapper) We present a method for formatting prose documents with semantic line breaks, where each sentence occupies its own line. This approach dramatically reduces noise in version control diffs when multiple authors collaborate on a manuscript. Our tool handles LaTeX, Org-mode, Markdown, and plaintext with format-aware parsing that preserves structural elements.
Without snapper: change one word, diff shows entire paragraph --- a/paper.org +++ b/paper.org @@ -1,3 +1,3 @@ -We present a method for formatting prose documents with semantic line breaks, where each sentence occupies its own line. This approach dramatically reduces noise in version control diffs when multiple authors collaborate on a manuscript. Our tool handles LaTeX, Org-mode, Markdown, and plaintext with format-aware parsing that preserves structural elements. +We present a method for formatting prose documents with semantic line breaks, where each sentence occupies its own line. This approach significantly reduces noise in version control diffs when multiple authors collaborate on a manuscript. Our tool handles LaTeX, Org-mode, Markdown, and plaintext with format-aware parsing that preserves structural elements.
With snapper: same change, diff shows one line --- a/paper.org +++ b/paper.org @@ -1,3 +1,3 @@ We present a method for formatting prose documents with semantic line breaks, where each sentence occupies its own line. -This approach dramatically reduces noise in version control diffs when multiple authors collaborate on a manuscript. +This approach significantly reduces noise in version control diffs when multiple authors collaborate on a manuscript. Our tool handles LaTeX, Org-mode, Markdown, and plaintext with format-aware parsing that preserves structural elements.

Built for academic workflows

Everything you need to adopt semantic line breaks across your paper writing toolchain.

Format-aware parsing

Understands Org-mode, LaTeX, Markdown, and plaintext. Code blocks, math environments, tables, and drawers pass through untouched.

Abbreviation-aware

Handles Dr., Fig., Eq., e.g., i.e., et al. and 80+ more. Add project-specific abbreviations via .snapperrc.toml.

Pre-commit hook

Ships with .pre-commit-hooks.yaml. Enforce semantic line breaks automatically on every commit across your team.

Editor integration

Stdin/stdout interface works with Emacs Apheleia, vim, and any editor that supports external formatters. Format on save.

Vale style package

Bundled vale rules flag lines with multiple sentences in your editor. Use --check for precise CI enforcement.

Git smudge/clean filter

Auto-format on commit, transparent to collaborators. Add to .gitattributes and formatting happens silently.

Install in seconds

Cargo
# crate: snapper-fmt, binary: snapper
cargo install snapper-fmt
# or build from source
cargo build --release
Nix
nix build github:TurtleTech-ehf/snapper
# or in a dev shell
nix develop github:TurtleTech-ehf/snapper
Pre-commit
# .pre-commit-config.yaml
- repo: https://github.com/TurtleTech-ehf/snapper
  rev: v0.1.0
  hooks:
    - id: snapper