git clone 'git://github.com/magnars/fold-this.el.git'
Just fold the active region, please.
fold-this visually replaces the current region with
If you move point into the ellipsis and press enter or
C-g it is unfolded.
You can unfold everything with
You can fold all instances of the text in the region with
It is available on marmalade and Melpa:
M-x package-install fold-this
Or just dump it in your load path somewhere and
I won't presume to know which keys you want these functions bound to, so you'll have to set that up for yourself. Here's some example code, which incidentally is what I use:
(global-set-key (kbd "C-c C-f") 'fold-this-all) (global-set-key (kbd "C-c C-F") 'fold-this) (global-set-key (kbd "C-c M-f") 'fold-this-unfold-all)
If you want to make sure that a mistype doesn't fold anything when
your region is deactivated, you can use
You can customize the visuals of the folded region by changing
Copyright (C) 2012-2015 Magnar Sveen
Author: Magnar Sveen mailto:firstname.lastname@example.org Keywords: convenience
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.