Skip to content

benthamite/org-table-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-table-wrap: Visual word-wrapping for Org tables

Org mode tables are plain-text constructs where every cell must fit on a single line. When a table has many columns or long cell content, it overflows the window and forces horizontal scrolling. org-table-wrap fixes this by rendering overflowing tables with word-wrapped cells using overlays — the buffer text is never modified.

The wrapped rendering uses Unicode box-drawing characters (with an ASCII fallback) and follows the same reveal-on-enter pattern as org-appear: when point enters a wrapped table, the overlay is removed for normal editing; when point leaves, the overlay is re-applied. Tables are automatically re-wrapped on window resize.

Column widths are allocated proportionally based on content, with a two-phase fitting approach: first a character-based allocation, then a pixel-accurate measurement pass that handles variable-width fonts, display scaling, and org-indent-mode prefix overhead.

Installation

Requires Emacs 29.1+ and Org 9.6+.

package-vc (built-in since Emacs 30):

(package-vc-install "https://github.com/benthamite/org-table-wrap")

Elpaca:

(use-package org-table-wrap
  :ensure (org-table-wrap :host github :repo "benthamite/org-table-wrap"))

straight.el:

(straight-use-package
 '(org-table-wrap :type git :host github :repo "benthamite/org-table-wrap"))

Quick start

Enable org-table-wrap globally for all Org buffers:

(global-org-table-wrap-mode 1)

Or enable it per-buffer:

(add-hook 'org-mode-hook #'org-table-wrap-mode)

Open any Org file with a wide table and it will be automatically wrapped to fit the window. Move point into the table to edit it normally.

Documentation

For a comprehensive description of all user options, commands, and functions, see the manual.

License

org-table-wrap is licensed under the GPL-3.0. See LICENSE for details.

About

Visual word-wrapping for Org tables

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors