dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

Text object i| skips last character in cell #149

Closed skajfes closed 5 years ago

skajfes commented 5 years ago

When I want to yank or change cell contents using text object i|, ie: yi| or ci|, the last character in the cell gets skipped.

dhruvasagar commented 5 years ago

Can you give an example ? I haven't seen this happen.

skajfes commented 5 years ago

Alright, minimal example is this:

| column |

When I position the cursor on the letter c (or anywhere in the column) and press di|, this is the result:

| n |

dhruvasagar commented 5 years ago

Ok this is very odd, I expected some weird scenario so asked for an example, will take a look, thanks for reporting.

dhruvasagar commented 5 years ago

Hi, I am unable to reproduce this. Which filetype are you facing this issue in ? It may be due to some other plugin with conflicting mapping.

skajfes commented 5 years ago

OK, I looked a little better at my config and found the source of the issue. I use mswin.vim in my config. And it sets the selection option to exclusive. Adding set selection=inclusive to my config fixed the issue for me. Side benefit is that the inclusive selection makes much more sense, since the cursor for selection and normal mode is a block covering the letter.

dhruvasagar commented 5 years ago

Good to know, closing the issue for now.