Skip to content

feat: add column text-objects (il, al)#47

Merged
kibi2 merged 6 commits intomainfrom
feat/text-object-l
Apr 2, 2026
Merged

feat: add column text-objects (il, al)#47
kibi2 merged 6 commits intomainfrom
feat/text-object-l

Conversation

@kibi2
Copy link
Copy Markdown
Owner

@kibi2 kibi2 commented Apr 2, 2026

Summary

Add column-based text-objects for tir-vim tables.

  • il: inner column
  • al: around column (including pipes)

The main use case is visual block selection:

  • vil: select current column
  • val: select column including delimiters

Design

This implementation is intentionally visual-mode oriented.

  • Operator-pending (yil, dal, etc.) is not supported
  • Instead, operations are expected to follow:
    • visual selection → operator (e.g. vily, vald)

This avoids unstable behavior of blockwise motions in Neovim
and keeps the implementation simple and predictable.

Implementation notes

  • Column range is detected by scanning for pipe delimiters
  • No block/AST structure is used (line-based lightweight approach)
  • Assumes auto-repair mode keeps table alignment consistent

Limitations

  • Behavior is undefined in manual mode (no alignment guarantee)
  • Cross-table operations may break (same as Vim blockwise behavior)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 88.51351% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lua/tirenvi/util/log.lua 0.00% 7 Missing ⚠️
lua/tirenvi/core/tir_vim.lua 94.36% 4 Missing ⚠️
lua/tirenvi/config.lua 85.71% 2 Missing ⚠️
lua/tirenvi/editor/textobj.lua 92.00% 2 Missing ⚠️
lua/tirenvi/init.lua 75.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kibi2 kibi2 force-pushed the feat/text-object-l branch 3 times, most recently from 71e96ed to 592e329 Compare April 2, 2026 08:53
@kibi2 kibi2 force-pushed the feat/text-object-l branch from 592e329 to c31d832 Compare April 2, 2026 22:52
@kibi2 kibi2 merged commit ae23e76 into main Apr 2, 2026
3 checks passed
@kibi2 kibi2 deleted the feat/text-object-l branch April 2, 2026 22:56
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.

1 participant