https://github.com/eshrh/far.el
elisp implementation of far, a DP algorithm for paragraph refilling
https://github.com/eshrh/far.el
Last synced: 7 months ago
JSON representation
elisp implementation of far, a DP algorithm for paragraph refilling
- Host: GitHub
- URL: https://github.com/eshrh/far.el
- Owner: eshrh
- License: gpl-3.0
- Created: 2022-10-26T04:06:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-20T20:38:31.000Z (over 2 years ago)
- Last Synced: 2025-01-12T22:13:25.259Z (over 1 year ago)
- Language: Emacs Lisp
- Size: 33.2 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* inflow.el: minimal variance paragraph filling
inflow.el (previously called far.el) is a reimplementation of
[[https://github.com/stephen-huan/inflow][inflow]] (previously called far).
It is an alternative to =fill-paragraph=, which reflows the
paragraph greedily. Inflow chooses line lengths by minimizing
the variance of lines subject to a width constraint.
* Dependencies
There are currently two non built in dependencies but these might go
away in the future if I decide to rewrite some bits more verbosely
+ =s.el=: string utils
+ =dash.el=: list utils
There is a good chance you already have one or two of these
packages installed if you use some common packages like magit.
=cl-lib= is also depended upon, which has been included in emacs since
24.3
* Installation
You could copy =inflow.el= into your load path the manual
way, or you could use a package manager like straight:
#+BEGIN_SRC emacs-lisp
(straight-use-package
'(inflow :type git
:repo "https://github.com/eshrh/inflow.el"))
#+END_SRC
* Usage
The variable =inflow-fill-paragraph-width= can be customized the change
the maximum line width. The default value is 70, which matches the emacs
default for =fill-column=. It may be helpful to write functions on mode
hooks that modify this value so that you can have different line widths
for different programming languages.
inflow.el currently exposes only one function,
=inflow-fill-paragraph= which fills the paragraph at the point.