A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jrblevin/markdown-mode/issues/625 below:

Allow disabling auto-align when traversing tables · Issue #625 · jrblevin/markdown-mode · GitHub

Expected Behavior

There should be an option to opt out of reformatting tables when moving between cells.

Actual Behavior

Moving between cells (TAB or S-TAB) realigns the whole table

Steps to Reproduce
  1. Create a markdown-mode buffer with this content (note that the table is not aligned):

    | foo | bar |
    | qux | quux |
  2. Put the cursor into any cell, and press TAB.

  3. Observe that the table was realigned.

Software Versions Motivation

My workflow happens to include editing large markdown tables (containing descriptions of configuration files), versioned under Git. At the moment, adding new rows often leads to reformatting the whole table, which results in a diff that is larger than I would like. These diffs are annoying to review, since the diff shows that the whole table has changed, rather than a few rows. I think there should be a way to opt out of this behavior.

Possible implementation

Guarding the markdown-table-align calls in markdown-table-forward-cell and markdown-table-backward-cell with a flag should probably do the trick.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4