Skip to content

plugins/table-mode: init - #4567

Open
opdavies wants to merge 1 commit into
nix-community:mainfrom
opdavies:plugin/vim-table-mode
Open

opdavies wants to merge 1 commit into
nix-community:mainfrom
opdavies:plugin/vim-table-mode

Conversation

@opdavies

@opdavies opdavies commented Oct 9, 2026

Copy link
Copy Markdown

Description

Adds vim-table-mode (vimPlugins.vim-table-mode), a VimL plugin for creating tables as you type, with automatic re-alignment and commands for converting delimited lines into tables.

Notes for reviewers:

  • mkVimPlugin with globalPrefix = "table_mode_"; settingsOptions deliberately not declared per the guidance on freeform settings (option names would have to track the plugin's global set; settingsExample covers the main toggles).
  • The plugin's older table_mode_auto_enable/table_mode_disable_ft/table_mode_echo/table_mode_lint globals were removed upstream in 2025, so the description documents the current approach (per-filetype ftplugin/autocommand running :TableModeEnable).

Things done

  • Built locally with the targeted test: nix develop --command tests plugins-by-name-table-mode
  • nix fmt clean
  • Added by-name module + test sources only (auto-imported)

Example enabling in a config:

plugins.table-mode = {
  enable = true;
  settings = {
    auto_align = true;
    disable_mappings = false;
    delimiter = ",";
  };
};

Comment on lines +15 to +18
Note: the plugin's `enable`/`disable`/`toggle` commands and mappings
manage table mode per buffer; there is no global auto-enable option.
To auto-enable for a filetype, run `:TableModeEnable` from that
filetype's ftplugin or an autocommand.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): always_active activates every buffer and removes the enable/disable/toggle commands. Could we qualify the description?

Suggested change
Note: the plugin's `enable`/`disable`/`toggle` commands and mappings
manage table mode per buffer; there is no global auto-enable option.
To auto-enable for a filetype, run `:TableModeEnable` from that
filetype's ftplugin or an autocommand.
By default, the plugin's `enable`/`disable`/`toggle` commands and
mappings manage table mode per buffer. Set `settings.always_active`
to `true` for permanent activation across buffers; this removes those
commands.
To auto-enable for a filetype with `always_active` left disabled, run
`:TableModeEnable` from that filetype's ftplugin or an autocommand.

Checked both modes with the locked package.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants