Canadajamescherti/outline-indent.el
Outline-indent: Indentation based Folding for Emacs (Supersedes legacy packages such as origami.el and yafolding.el)
📂 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=indenttrong Vim. - Di chuyển khối lên/xuống:
outline-indent-move-subtree-upvàoutline-indent-move-subtree-down. - Điều chỉnh thụ mỗc:
outline-indent-shift-rightvàoutline-indent-shift-left. - Thêm dòng tiêu đề:
outline-indent-insert-headingchè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-levelvà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-selectchọ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-offsetvàshift-widthcủ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
Similar Projects
Discover other similar projects and AI models.
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...
A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
Prelude is an enhanced Emacs 29.1+ distribution that should make your experience with Emacs both more pleasant and more powerful.
The Clojure Interactive Development Environment that Rocks for Emacs