GNU-devel ELPA - valign

valign

Description
Visually align tables
Latest
valign-3.1.1.0.20210501.211155.tar (.sig), 2024-Mar-31, 60.0 KiB
Maintainer
Yuan Fu <casouri@gmail.com>
Atom feed
valign.xml
Website
https://github.com/casouri/valign
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

中文 README

This package provides visual alignment for Org Mode, Markdown and table.el tables on GUI Emacs. It can properly align tables containing variable-pitch font, CJK characters and images. Meanwhile, the text-based alignment generated by Org mode (or Markdown mode) is left untouched.

To use this package, load it and add valign-mode to org-mode-hook or markdown-mode-hook:

(add-hook 'org-mode-hook #'valign-mode)

default.png

table.el.png

Known problems:

  • Hidden links in markdown still occupy the full length of the link, because it uses character composition which we don’t support now.
  • Rendering large tables (≥100 lines) is laggy.

Note:

For table.el tables to work with valign, each cell has to have at least one space on the right and no space on the left. You can use ftable.el to auto-layout the table for you.

1. Install

You can obtain valign.el from GNU ELPA by typing:

M-x package-install RET valign RET

2. Customization

Set valign-fancy-bar to non-nil:

fancy-bar.png

This only affects Org Mode and Markdown tables.

By default, valign doesn’t re-align the table after normal edit commands like self-insert-command and backward-kill-word. If you want valign to not re-align the table after a certain command, add that command to valign-not-align-after-list.

Because valign isn’t particularly efficient, it doesn’t align tables larger than 4000 characters in size. If you want to change that behavior, customize valign-max-table-size. Valign puts valign-table-fallback face on those large tables.

Other (less interesting) customization:

  • valign-signal-parse-error: Set to non-nil to be informed of parse errors.
  • valign-lighter: Lighter in mode-line.
  • valign-box-charset-alist: Used for defining table.el tables, e.g., Unicode/ASCII tables.

3. If function advice makes you itch

valign-mode adds advice and doesn’t remove them even if you close valign-mode because function advice is global and valign-mode is local. If you want to remove the advice, use valign-remove-advice. If you run this while some buffer still has valign-mode on, they break.

Old versions

valign-3.1.1.0.20210502.11155.tar.lz2021-May-1313.3 KiB
valign-3.1.1.0.20210316.162546.tar.lz2021-Mar-1613.2 KiB
valign-3.1.0.0.20210314.195233.tar.lz2021-Mar-1613.2 KiB
valign-3.1.0.0.20210128.34233.tar.lz2021-Jan-2812.2 KiB
valign-3.0.0.0.20201202.134924.tar.lz2020-Dec-1411.5 KiB