Skip to content
/ far.el Public

elisp implementation of far, a DP algorithm for paragraph refilling

License

Notifications You must be signed in to change notification settings

eshrh/far.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

far.el: minimal variance paragraph filling

Far.el is a reimplementation of inflow (previously called far).

It is an alternative to fill-paragraph, which reflows the paragraph greedily. Far 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 far.el into your load path the manual way, or you could use a package manager like straight:

(straight-use-package
 '(far :type git
       :repo "https://github.com/eshrh/far.el"))

Usage

The variable far-fill-paragraph-width can be customized the change the maximum line width. The default value is 80. 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.

Far.el currently exposes only one function, far-fill-paragraph which fills the paragraph at the point.

About

elisp implementation of far, a DP algorithm for paragraph refilling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published