Merge pull request #4143 from innerout/fold-docs

Add emacs bindings and documentation in fold module
This commit is contained in:
Henrik Lissner 2020-11-06 02:33:53 -05:00 committed by GitHub
commit ee6c27c2a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 10 deletions

View file

@ -564,3 +564,13 @@
(:when (featurep! :ui treemacs)
"<f9>" #'+treemacs/toggle
"<C-f9>" #'treemacs-find-file))
(map! :leader
(:when (featurep! :editor fold)
(:prefix ("C-f" . "fold")
"C-d" #'vimish-fold-delete
"C-a C-d" #'vimish-fold-delete-all
"C-f" #'+fold/toggle
"C-a C-f" #'+fold/close-all
"C-u" #'+fold/open
"C-a C-u" #'+fold/open-all)))

View file

@ -4,13 +4,13 @@
#+STARTUP: inlineimages
* Table of Contents :TOC_3:noexport:
- [[Description][Description]]
- [[Module Flags][Module Flags]]
- [[Plugins][Plugins]]
- [[Prerequisites][Prerequisites]]
- [[Features][Features]]
- [[Configuration][Configuration]]
- [[Troubleshooting][Troubleshooting]]
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
This module marries hideshow, vimish-fold and outline-minor-mode to bring you
@ -20,13 +20,25 @@ marker, indent and syntax-based code folding for as many languages as possible.
This module provides no flags.
** Plugins
+ evil-vimish-fold*
+[[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]]
+[[https://github.com/matsievskiysv/vimish-fold][vimish-fold]]
* Prerequisites
This module has no prerequisites.
* TODO Features
* Features
Emacs keybinds when evil +everywhere is disabled.
| Keybind | Description |
|------------------------+---------------------------|
| =C-c C-f C-f= | Fold region |
| =C-c C-f C-u= or =C `= | Unfold region |
| =C-c C-f C-d= | Delete folded region |
| =C-c C-a C-f= | Refold all regions |
| =C-c C-a C-u= | Unfold all regions |
| =C-c C-a C-d= | Delete all folded regions |
* TODO Configuration
* TODO Troubleshooting
* Troubleshooting
Sometimes an unfolded region does not fold back with =C-c C-f C-f=. To bypass this bug you must delete the folded region (=C-c C-f C-d=) and then fold it(=C-c C-f C-f=) again.