dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.1k stars 97 forks source link

TableSort only sorts first column #156

Closed oblitzitate closed 4 years ago

oblitzitate commented 4 years ago

The issue is :TableSort[!] only sorts first column regardless of where the cursor is. Whereas <Leader>ts seems to work fine for any column.

I'd also like to suggest a key binding for sorting in descending order.

dhruvasagar commented 4 years ago

@oblitzitate Thanks for reporting this, I was testing the code and from the looks of it this seems to be a bug with vim itself. For some reason the cursor position is altered (col('.') returns 1) when calling via a command as opposed to the mapping. I will try to get back to this and test more if there's a way to avoid this.