Skip to content

Malabarba/fancy-narrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unsupported Package

Heads up. This package is quite hacky, and I don't support anymore. Of course, you're free to use it if you want, I just won't offer support for any bugs you encounter.

fancy-narrow

Emacs package to immitate narrow-to-region with more eye-candy.

Narrowed google-this

Unlike narrow-to-region, which completely hides text outside the narrowed region, this package simply deemphasizes the text, makes it readonly, and makes it unreachable. This leads to a much more natural feeling, where the region stays static (instead of being brutally moved to a blank slate) and is clearly highlighted with respect to the rest of the buffer.

Installation

The easiest way is to install from Melpa.

M-x package-install fancy-narrow

You can also download this file, open it in emacs, and use M-x package-install-from-buffer.

Usage

  1. Simply call fancy-narrow-to-region to see it in action. To widen the region again afterwards use fancy-widen.

  2. If you activate the minor mode (fancy-narrow-mode), then the standard narrowing keys (C-x n n, C-x n w, etc) will make use of fancy-narrow.

Customization

To customise the face used to deemphasize unreachable text, customise fancy-narrow-blocked-face.

Note this is designed for user interaction. For using within lisp code, the standard narrow-to-region is preferable, because the fancy version is susceptible to inhibit-read-only and some corner cases.

About

Emacs package to immitate narrow-to-region with more eye-candy

Resources

License

Stars

Watchers

Forks

Packages

No packages published