RepositoryEmacs LispCACanada
jamescherti

jamescherti/outline-indent.el

Outline-indent: Indentation based Folding for Emacs (Supersedes legacy packages such as origami.el and yafolding.el)

148sao
4fork
0issue
0lượt xem

📂 outline-indent.el — Gập mã theo thụ mỗc nhanh như Vim, nguyên bản trên Emacs

Một minor mode hiện đại dựa trên thụ mỗc, xây dựng trên outline-minor-mode của Emacs — nhanh, nhẹ, không cần phụ thuộc bên ngoài.

outline-indent là một gói Emacs Lisp cung cấp chế độ gập mã dựa trên mức thụ mỗc, nhanh chóng và được xây dựng trực tiếp trên các hàm nội bản của Emacs. Đây là lựa chọn thay thế hiện đại cho các gói lỗi thời như origami.el và yafolding.el — cả hai đều ngừng bảo trì, chậm và có lỗi.

✨ Điểm nổi bật

  • Gập mã theo thụ mỗc: Hỗ trợ gập/mở rộng khối mã dựa trên mức độ thụ mỗc, tương tự set foldmethod=indent trong Vim.
  • Di chuyển khối lên/xuống: outline-indent-move-subtree-up và outline-indent-move-subtree-down.
  • Điều chỉnh thụ mỗc: outline-indent-shift-right và outline-indent-shift-left.
  • Thêm dòng tiêu đề: outline-indent-insert-heading chèn dòng ở cùng mức thụ mỗc hiện tại.
  • Điều hướng cùng mức: outline-indent-forward-same-level và outline-indent-backward-same-level.
  • Tùy chỉnh dấu ba chấm: Thay thế ... bằng ký tự như ▼.
  • Chọn khối toàn bộ: outline-indent-select chọn toàn bộ khối thụ mỗc tại con trỏ.
  • Bật/tắt mức tại chỗ: outline-indent-toggle-level-at-point ẩn/hiện mức thụ mỗc hiện tại.
  • Tự động phát hiện offset: Tự động nhận diện basic-offset và shift-width của major mode.

💡 Vì sao đáng chú ý

Khác biệt với các gói gập mã truyền thống, outline-indent dựa trên outline-minor-mode — một phần của lõi Emacs — nên được duy trì chủ động bởi cộng đồng phát triển Emacs. Điều này mang lại tốc độ vượt trội và độ ổn định cao. Gói hỗ trợ kích hoạt tự động qua hook cho Python, YAML, Haskell và nhiều ngôn ngữ khác, kèm bản đồ phím mặc định trực quan.


#EmacsLisp #OutlineFolding #CodeFolding #Emacs #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryEmacs Lisp
jamescherti/kirigami.el

kirigami.el, a unified method to fold and unfold text in Emacs: outline, outline-indent, org-mode, markdown-mode, gfm-mode, vdiff, hideshow, fold-this, ts-fold, treesit-fold, vimish-fold...

166
Oct 20, 2026
RepositoryEmacs Lisp
syl20bnr/spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!

24.5k
Oct 26, 2026
RepositoryEmacs Lisp
doomemacs/core

An Emacs framework for the stubborn martian hacker

22.8k
Oct 2, 2026
RepositoryEmacs Lisp
bbatsov/prelude

Prelude is an enhanced Emacs 29.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.

5.3k
Oct 2, 2026
RepositoryEmacs Lisp
emacs-lsp/lsp-mode

Emacs client/library for the Language Server Protocol

5.1k
Oct 20, 2026
RepositoryEmacs Lisp
bbatsov/projectile

Project Interaction Library for Emacs

4.2k
Sep 30, 2026
RepositoryEmacs Lisp
clojure-emacs/cider

The Clojure Interactive Development Environment that Rocks for Emacs

3.7k
Oct 20, 2026
RepositoryEmacs Lisp
karthink/gptel

A simple, extensible LLM client for Emacs

3.6k
Oct 18, 2026
RepositoryEmacs Lisp
emacs-helm/helm

Emacs incremental completion and selection narrowing framework

3.5k
Oct 22, 2026