Skip to content

Commit 20e9c3c

Browse files
authored
v0.3.0 (#52)
### Added - **Auto-split feature for multiline cells**: When inserting a pipe character in a multiline cell, the entire cell is now split across all lines at the same column position, not just the current line. Disabled by default, enable with `auto_split_cell` option. - **Insert/delete/move row and column actions**: - `:Table InsertRow` and `:Table InsertCol`, - `:Table DeleteRow` and `:Table DeleteCol` - `:Table MoveRow {direction}` and `:Table MoveCol {direction}` - Available as `<Plug>` mappings - cell movement increments the jumplist ### Fixed - Completing a table in a comment block now extends the comment prefix if needed - Cell movement is correct when cells are empty ### Changed - `paragraph_wrap` now allows multiple paragraphs in a single cell, separated by blank lines, and wraps each paragraph separately while preserving blank lines between them - `chunk_size` option now uses positive integers for both directions - Default `chunk_size` range increased from `[10, 10]` to `[20, 20]`
1 parent ee58093 commit 20e9c3c

16 files changed

Lines changed: 740 additions & 95 deletions

File tree

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [v0.3.0] - 2026-02-27
6+
7+
### Added
8+
- **Auto-split feature for multiline cells**: When inserting a pipe character in
9+
a multiline cell, the entire cell is now split across all lines at the same
10+
column position, not just the current line. Disabled by default, enable with
11+
`auto_split_cell` option.
12+
- **Insert/delete/move row and column actions**:
13+
- `:Table InsertRow` and `:Table InsertCol`,
14+
- `:Table DeleteRow` and `:Table DeleteCol`
15+
- `:Table MoveRow {direction}` and `:Table MoveCol {direction}`
16+
- Available as `<Plug>` mappings
17+
- cell movement increments the jumplist
18+
19+
### Fixed
20+
- Completing a table in a comment block now extends the comment prefix if needed
21+
- Cell movement is correct when cells are empty
22+
23+
### Changed
24+
- `paragraph_wrap` now allows multiple paragraphs in a single cell, separated by
25+
blank lines, and wraps each paragraph separately while preserving blank lines
26+
between them
27+
- `chunk_size` option now uses positive integers for both directions
28+
- Default `chunk_size` range increased from `[10, 10]` to `[20, 20]`
29+
530
## [v0.2.0] - 2026-02-19
631

732
### Added

README.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# table.vim
1+
# table.vim v0.3.0
22

33
Advanced table editing for Vim and Neovim. Easily create, edit, and format
44
tables with support for multi-line rows, fixed-width columns, sorting, and
@@ -32,6 +32,24 @@ And may be completed to:
3232

3333
See [`:help table.txt`](doc/table.txt) for complete documentation.
3434

35+
## Features
36+
37+
- **Multiline rows** - auto-detected by default
38+
- **Auto-split multiline cells** - inserting a pipe splits the entire cell (enable via `auto_split_cell` option)
39+
- **Fixed-width columns** - hard-wrap columns with alignment tags
40+
- **Cell editing window** - edit in a floating window, hooks provided (split window in Vim)
41+
- **Sorting** - sort rows and columns by any column/row
42+
- **Insert/Delete/Move actions** - insert, delete, and move rows and columns
43+
- **Table navigation** - move between cells even if the table is not yet aligned
44+
- **Text objects** - cell, row, and column
45+
- **Multiple table styles** - markdown, org, rst, and box-drawing styles included, or define your own
46+
47+
## Demo
48+
49+
Note: This demo is from an older version, options have changed. See the Upgrading from v0.1.x section for details.
50+
51+
https://github.com/user-attachments/assets/352e23b0-33ba-4f9d-9fa0-e2aee5fd16cc
52+
3553
## Requirements
3654

3755
- Vim 8.1 or later
@@ -43,21 +61,6 @@ See [`:help table.txt`](doc/table.txt) for complete documentation.
4361
- **`:TableOption`** is deprecated. Use **`:TableConfig`** instead.
4462
- If you used `preserve_indentation`, switch to `multiline_format` (see `:help table-configuration`). Default behavior is unchanged.
4563

46-
## Features
47-
48-
- **Multiline rows** - auto-detected by default
49-
- **Fixed-width columns** - hard-wrap columns with alignment tags
50-
- **Cell editing window** - edit in a floating window, hooks provided (split window in Vim)
51-
- **Sorting** - sort rows and columns by any column/row
52-
- **Table navigation** - move between cells even if the table is not yet aligned
53-
- **Text objects** - cell, row, and column
54-
- **Multiple table styles** - markdown, org, rst, and box-drawing styles included, or define your own
55-
56-
## Demo
57-
58-
Note: This demo is from an older version, options have changed.
59-
https://github.com/user-attachments/assets/352e23b0-33ba-4f9d-9fa0-e2aee5fd16cc
60-
6164
## Configuration (optional)
6265

6366
Configuration is **buffer-local**. Set defaults in your vimrc, customize
@@ -129,6 +132,14 @@ nnoremap <leader>ta <Plug>(table_align)
129132
nnoremap <leader><bar> <Plug>(table_complete)
130133
nnoremap <leader>td <Plug>(table_to_default)
131134
nnoremap <leader>te <Plug>(table_cell_edit)
135+
nnoremap <leader>tir <Plug>(table_insert_row)
136+
nnoremap <leader>tic <Plug>(table_insert_column)
137+
nnoremap <leader>tdr <Plug>(table_delete_row)
138+
nnoremap <leader>tdc <Plug>(table_delete_column)
139+
nnoremap <leader>tmk <Plug>(table_move_row_up)
140+
nnoremap <leader>tmj <Plug>(table_move_row_down)
141+
nnoremap <leader>tmh <Plug>(table_move_column_left)
142+
nnoremap <leader>tml <Plug>(table_move_column_right)
132143
```
133144

134145
## Commands
@@ -142,6 +153,12 @@ is available for all subcommands and arguments.
142153
:Table EditCell " Edit cell in split (Vim) or floating (Neovim) window
143154
:Table Complete " Fill missing cells and borders (processes entire table)
144155
:Table Align " Align table columns (processes chunk near cursor)
156+
:Table InsertRow " Insert a new row at cursor position
157+
:Table InsertCol " Insert a new column at cursor position
158+
:Table DeleteRow " Delete the row at cursor position
159+
:Table DeleteCol " Delete the column at cursor position
160+
:Table MoveRow {up|down} " Move current row up or down
161+
:Table MoveCol {left|right} " Move current column left or right
145162
:Table SortRows[!] {col} [flags] " Sort rows by specified column (! for reverse)
146163
:Table SortCols[!] {row} [flags] " Sort columns by specified row (! for reverse)
147164
:Table ToDefault " Convert to default style (using i_vertical/i_horizontal)

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
* table caching is disables in favor of chunk processing. re-enable later if needed.
22
* validate config option values
3+
* add data member to table.placement to track if the table is in a comment or not
4+
* support comment strings with RHS, e.g. /* table */
5+
* scan for alignment row when chunksize doesn't pick it up

0 commit comments

Comments
 (0)