All Projects → matsievskiysv → Vimish Fold

matsievskiysv / Vimish Fold

Vim-like text folding for Emacs

Labels

Projects that are alternatives of or similar to Vimish Fold

Evil Snipe
2-char searching ala vim-sneak & vim-seek, for evil-mode
Stars: ✭ 196 (-10.91%)
Mutual labels:  emacs
Elfeed Org
Configure the Elfeed RSS reader with an Orgmode file
Stars: ✭ 203 (-7.73%)
Mutual labels:  emacs
Github Review
Github code reviews with Emacs.
Stars: ✭ 210 (-4.55%)
Mutual labels:  emacs
Lsp Treemacs
lsp-mode ❤️ treemacs
Stars: ✭ 200 (-9.09%)
Mutual labels:  emacs
Toc Org
toc-org is an Emacs utility to have an up-to-date table of contents in the org files without exporting (useful primarily for readme files on GitHub)
Stars: ✭ 202 (-8.18%)
Mutual labels:  emacs
Verb
Organize and send HTTP requests from Emacs
Stars: ✭ 205 (-6.82%)
Mutual labels:  emacs
Dimmer.el
Interactively highlight which buffer is active by dimming the others.
Stars: ✭ 194 (-11.82%)
Mutual labels:  emacs
Atom One Dark Theme
Atom One Dark - An Emacs port of the Atom One Dark theme from Atom.io.
Stars: ✭ 217 (-1.36%)
Mutual labels:  emacs
Emacs Module Rs
Rust binding and tools for emacs-module (Emacs's dynamic module support)
Stars: ✭ 203 (-7.73%)
Mutual labels:  emacs
Doct
DOCT: Declarative Org Capture Templates for Emacs
Stars: ✭ 210 (-4.55%)
Mutual labels:  emacs
Evil Multiedit
Multiple cursors for evil-mode, based on iedit
Stars: ✭ 200 (-9.09%)
Mutual labels:  emacs
Company Sourcekit
Completion for Swift projects via SourceKit with the help of SourceKitten
Stars: ✭ 203 (-7.73%)
Mutual labels:  emacs
Dotfiles
Ninrod's sharpened dotfiles for emacs, vim, zsh, tmux. Since '15.
Stars: ✭ 208 (-5.45%)
Mutual labels:  emacs
Hackernews.el
Hacker News client for Emacs
Stars: ✭ 200 (-9.09%)
Mutual labels:  emacs
Modalka
Modal editing your way
Stars: ✭ 212 (-3.64%)
Mutual labels:  emacs
Emacs Direnv
direnv integration for emacs
Stars: ✭ 194 (-11.82%)
Mutual labels:  emacs
Uncledavesemacs
My personal ~/.emacs.d
Stars: ✭ 204 (-7.27%)
Mutual labels:  emacs
Emacs Bash Completion
Add programmable bash completion to Emacs shell-mode
Stars: ✭ 217 (-1.36%)
Mutual labels:  emacs
Homebrew Emacs Head
GNU Emacs formula for the Homebrew package manager
Stars: ✭ 214 (-2.73%)
Mutual labels:  emacs
Fsautocomplete
F# language server using Language Server Protocol
Stars: ✭ 208 (-5.45%)
Mutual labels:  emacs

Vimish Fold

License GPL 3 MELPA CircleCI

Vimish Fold

This is a package to perform text folding like in Vim. It has the following features:

  • folding of active regions;

  • good visual feedback: it's obvious which part of text is folded;

  • create folds from regions between {{{ }}} automatically (marks are customizable);

  • persistence by default: when you kill a buffer your folds don't disappear;

  • persistence scales well, you can work on hundreds of files with lots of folds without adverse effects;

  • it does not break indentation;

  • folds can be toggled from folded state to unfolded and back very easily;

  • quick navigation between existing folds;

  • you can use mouse to unfold folds (good for beginners and not only for them);

  • for fans of the avy package: you can use avy to fold text with minimal number of key strokes!

Installation

If you would like to install the package manually, download or clone it and put on Emacs' load-path, then you can require it in your init file like this:

(require 'vimish-fold)

It's available via MELPA, so you can just M-x package-install RET vimish-fold RET.

Usage

First of all, create global key bindings for most important functions:

  • vimish-fold creates folds;
  • vimish-fold-delete deletes folds.

When point is inside of a fold you can toggle it with C-`, so usually you don't need to bind toggling functions.

Minimal code creating the keybindings might look like this:

(global-set-key (kbd "<menu> v f") #'vimish-fold)
(global-set-key (kbd "<menu> v v") #'vimish-fold-delete)

Of course you can choose different key bindings.

Other functions that constitute API of the package:

  • vimish-fold-unfold
  • vimish-fold-unfold-all
  • vimish-fold-refold
  • vimish-fold-refold-all
  • vimish-fold-delete-all
  • vimish-fold-toggle
  • vimish-fold-toggle-all
  • vimish-fold-avy (requires avy package)
  • vimish-fold-from-marks

To get persistent folds you need to enable a minor mode provided by the package. You can turn vimish-fold-mode selectively for modes where you want to have persistent folding, or simply activate it everywhere:

(vimish-fold-global-mode 1)

Customization

There are a number of customization options that are available via M-x customize-group vimish-fold. Everything is carefully documented, as always.

License

This work is based on Magnar Sveen's fold-this package to some extent, so I think I should include him as an author, thanks Magnar!

Copyright © 2015–present Mark Karpov
Copyright © 2012–2013 Magnar Sveen

Distributed under GNU GPL, version 3.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].