Skip to content

NeatEditor/NeatEditor

Repository files navigation

NeatEditor

Platform Swift UI Project License

A minimal, fast-launching macOS plain text editor built with SwiftUI and AppKit for distraction-free writing, native desktop interactions, and efficient multi-tab editing.

Languages: English | Simplified Chinese | Japanese | Korean | Spanish | French | German

Screenshot

NeatEditor screenshot showing the main writing workspace on macOS

Why NeatEditor

NeatEditor is built around a simple goal: reduce interface noise and keep your attention on the text.

  • Fast launch: avoid unnecessary blocking work on the app startup path.
  • Space-first UI: keep the editor surface front and center instead of surrounding it with chrome.
  • Native macOS behavior: preserve familiar title bar, menus, shortcuts, and window interactions.
  • Plain-text focus: ideal for notes, drafts, scratch writing, and lightweight editing.

Highlights

  • Multi-tab plain text editing with a ready-to-use document on launch.
  • Low-latency tab selection, closing, and in-place renaming.
  • Open local text files through Finder, drag and drop, or pasted file URLs.
  • Built-in line numbers, native find, undo, IME composition handling, and Command +/- zooming.
  • Debounced autosave plus save-on-tab-switch and save-on-app-deactivation behavior.
  • Pin-to-top window support and native title bar double-click zoom behavior.
  • Disk-backed rename behavior that preserves editable file extensions.
  • Blank content never overwrites existing files by design.

Main Shortcuts

Shortcut Action
Command + N Create a new document.
Command + T Open another new tab.
Command + O Open one or more local text files.
Command + S Save the current tab immediately.
Command + W Save and close the current tab.
Shift + Command + T Reopen the most recently closed tab.
Command + F Show the inline find bar for the current editor.
Command + = or Command + + Zoom in the editor text.
Command + - Zoom out the editor text.
Command + , Open Settings.
Shift + Return Insert a new line at the end of the current line.

Standard macOS text shortcuts such as Command + Z, Command + X, Command + C, and Command + V also work through the native text system.

Current Status

NeatEditor is ready to use as a lightweight macOS plain text editor and is now being published as 1.0.0.

  • Platform target: macOS 15.0+
  • Stack: Swift 6, SwiftUI, AppKit bridge, Observation, XcodeGen
  • Validation today: build verification and manual testing
  • Scope today: plain text workflow, no rich text, plugins, or cross-platform support

Quick Start

Requirements

  • macOS 15.0+
  • Xcode 16.2+
  • XcodeGen 2.44+

Clone And Open

git clone <repo-url>
cd NeatEditor
xcodegen generate
open NeatEditor.xcodeproj

Build From Terminal

xcodebuild -project "NeatEditor.xcodeproj" \
  -scheme "NeatEditor" \
  -configuration Debug \
  -destination 'platform=macOS' \
  -derivedDataPath build/DerivedData \
  build

Development Notes

  • project.yml is the source of truth for the project structure.
  • Run xcodegen generate after adding or removing source files.
  • The repository does not yet include a test target, so xcodebuild ... test is not configured.
  • For behavior changes, prefer validating with the built app rather than relying on previews alone.

Releases

This repository includes a tag-driven GitHub Releases workflow.

  • Push a tag like v1.0.0 and GitHub Actions will build the release automatically.
  • The workflow produces a macOS universal zip.
  • The release also includes SHA256SUMS.txt.

The simplest release flow is:

git tag v1.0.0
git push origin v1.0.0

See RELEASING.md for details.

Project Structure

NeatEditor/
├── docs/
│   └── images/
│       └── neateditor-main-window.png
├── project.yml
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
└── Sources/
    └── NeatEditor/
        ├── App/             # App entry point, commands, and external file opening
        ├── Features/
        │   ├── Editor/      # AppKit bridge editor, line numbers, and zoom
        │   └── Workspace/   # Tab strip, workspace state, and main UI
        ├── Services/        # Autosave and document persistence
        ├── SharedUI/        # Shared styling and title bar helper views
        ├── Resources/       # Localization resources
        └── Assets.xcassets  # Image assets

Repository Docs

Known Gaps

These are reasonable next steps after the initial public release:

  • Add a test target for save, rename, and state restoration flows.
  • Add Apple code signing, notarization, and DMG packaging for smoother distribution.
  • Add a general CI workflow for pushes and pull requests.

Contributing

Issues, suggestions, and pull requests are welcome. Please read CONTRIBUTING.md first.

License

NeatEditor is released under the MIT License.

About

NeatEditor is a minimal, fast-launching macOS plain text editor built with SwiftUI and AppKit, designed for distraction-free writing, native desktop interactions, and efficient multi-tab editing.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages