Home
Softono
PNANA

PNANA

Open source MIT C++
302
Stars
12
Forks
15
Issues
6
Watchers
1 week
Last Commit

About PNANA

PNANA is a modern terminal text editor built with FTXUI, inspired by Nano, Micro, and Sublime Text. It offers an intuitive UI, familiar shortcuts, and robust editing capabilities.

Platforms

Web Self-hosted

Languages

C++

Links

pnana logo

pnana - Modern Terminal Text Editor

pnana C++ FTXUI License Platform Platform

English | δΈ­ζ–‡

pnana is a modern terminal text editor built with FTXUI, inspired by Nano, Micro, and Sublime Text. It provides a friendly user interface, intuitive keyboard shortcuts, and powerful editing features.

πŸ“Έ Demo

pnana demo

✨ Core Features

🎨 Beautiful and Friendly Interface

  • Multiple Themes: Monokai (default), Dracula, Solarized Dark/Light, OneDark, Nord...
  • Three-Column Layout: Top menu bar, middle editing area, bottom help bar
  • Smart Status Bar: Displays file information, cursor position, encoding, and modification status
  • Line Numbers: Switch between absolute and relative line numbers
  • Current Line Highlighting: Clearly identifies the editing position

⌨️ Modern Keyboard Shortcuts

Abandoning the learning curve of traditional Vim, pnana adopts intuitive shortcuts from modern editors. Use familiar standard shortcuts like Ctrl+S to save, Ctrl+Z to undo, with zero learning curve.

Complete Shortcut List: See Keyboard Shortcuts Documentation

πŸ“ Powerful Editing Features

Multi-File Support

  • Tab System: Open multiple files simultaneously
  • Split Editing: Horizontal/vertical split screens (plannedοΌ‰
  • Quick Switching: Fast file switching with keyboard

Smart Editing

  • Auto Indent: Intelligent indentation based on file type, powered by Tree-sitter AST parsing, see Smart Indent Documentation
  • Bracket Matching: Auto-complete brackets and quotes
  • Multi-Cursor Editing: Edit multiple positions simultaneously (planned)
  • Column Selection: Hold Alt for column selection
  • Smart Undo/Redo: Unlimited undo/redo

Search and Replace

  • Regular Expressions: Support for regex search
  • Case Sensitive: Optional case matching
  • Batch Replace: Replace all matches at once
  • Live Preview: Real-time search result highlighting

Syntax Highlighting

Supports multiple programming languages: C/C++, Python, JavaScript/TypeScript, Java, Go, Rust, Ruby, PHP, HTML/CSS, JSON, XML, Markdown, Shell, SQL, YAML, TOML

LSP Support (Language Server Protocol)

  • Code Completion: Intelligent code completion for multiple programming languages
  • Real-time Diagnostics: Syntax errors and warnings displayed in real-time
  • Code Navigation: Jump to definition, find references
  • Symbol Search: Quickly find functions, classes, variables, and more
  • Auto Configuration: Automatically detects and configures LSP servers

LSP: Built-in LSP client for completion, diagnostics, navigation

Lua Plugin System (PlanedοΌ‰

  • Powerful Extensibility: Write plugins in Lua to easily extend editor functionality
  • Rich API: Complete editor API supporting file operations, cursor control, event listening, and more
  • Easy to Use: Inspired by Neovim's design, plugin development is simple and intuitive
  • Auto Loading: Plugins are automatically discovered and loaded, no manual configuration needed

Detailed Plugin Development Guide: See Plugin Documentation

πŸ”§ Configuration System

Simple JSON configuration file supporting themes, fonts, indentation, and other settings.

Detailed Configuration Guide: See Configuration Documentation

πŸš€ Quick Start

⚠️ Important: Before compiling, please ensure all required dependencies are installed.

  • Required: FTXUI terminal UI library must be installed
  • Optional Features: To enable advanced features like image preview, Tree-sitter syntax highlighting, Lua plugin system, SSH support, AI client, etc., please refer to Dependencies Documentation to install corresponding dependencies
  • Quick Start: For detailed build steps and feature enabling guide, see Quick Start Guide

Build Requirements

Dependencies Documentation - Project dependencies and installation
Quick Start Guide - 5-minute quick start guide

Build and Install

# Clone repository
cd /path/to/pnana
chmod +x ./build.sh

# Build project
./build.sh

# Run pnana
./build/pnana

# Or install to system
cd build
sudo make install
pnana filename.txt

Usage Examples

# Start blank editor
pnana

# Open single file
pnana file.txt

# Specify config file
pnana --config ~/.config/pnana/config.json

# Use specific theme
pnana --theme dracula file.txt

πŸ“– Documentation

Detailed documentation and guides are available in the docs folder:

πŸ’‘ Why Choose pnana?

  1. Zero Learning Curve: Use familiar Ctrl shortcuts, no need to memorize complex commands
  2. Ready to Use: Get an excellent editing experience without configuration
  3. Modern Design: Beautiful UI and comfortable color schemes
  4. Lightweight and Efficient: Terminal-based, low resource usage, fast startup
  5. Feature Complete: Feature set comparable to GUI editors

🀝 Comparison with Similar Products

Feature pnana Nano Micro Vim/Neovim
Learning Curve Low Low Low High
Modern UI βœ… ❌ βœ… Requires config
Mouse Support ❌ ⚠️ βœ… Requires config
Syntax Highlighting βœ… ⚠️ βœ… βœ…
Multi-File βœ… ❌ βœ… βœ…
Plugin System βœ… ❌ βœ… βœ…
LSP Support βœ… ❌ βœ… βœ…
Simple Configuration βœ… βœ… βœ… ❌

πŸ“š References and Inspiration

This project is inspired by the following excellent projects:

  • Nano - Simple and easy-to-use terminal editor
  • Micro - Modern terminal editor
  • Sublime Text - Classic text editor
  • VS Code - Modern IDE
  • FTXUI - Powerful terminal UI library

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Star History

Star History Chart