janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
211 stars 30 forks source link

drag and paste like excel #152

Closed g-fleming closed 2 months ago

g-fleming commented 3 months ago

Feature

The latest version of handson table has the ability to highlight one or more cells and drag sideways or up/down to auto paste based on highlighted contents (either repeat or continue sequential pattern).

I understand from documentation that the extension cannot be updated to latest Handson table library due to license restrictions, however, is it possible to edit library manually and add this UI feature?

janisdd commented 3 months ago

Unfortunately, handsontable has removed the old docs that stated which features are "pro" (require a license).

Fortunately, I managed to find the docs for version 6.2.2 elsewhere and "Autofill" was not a "pro" feature. So I just need to enable it....

But I intentionally disabled it because it's more of an Excel feature and perhaps suggests that other Excel features work too (e.g. you select cells with 1,2,3 and it fills 4,5,6,7,8 ...).

I'm wondering if I should set up an option for this feature and if it should be enabled by default (could be handy sometimes). It would just have the "copy" functionality (and the copy sequence 1,2,3 fills 1,2,3 repeatedly). I would also set AutoInsertRows to false because it can interrupt other functions.

g-fleming commented 3 months ago

yes this sounds like a really good option! Though I am curious, if library can be edited to just do as excel does (123 goes to 456 and 111 goes to 111). It seems like the few patterns that would be supported aren't that complex. I wonder why there is the difference in handson.

janisdd commented 2 months ago

I've added an option autoFill that is enabled by default (think that this should not harm anyone). However, it is not live yet.

I think the problem with the pattern is what the user expects. It is completely opaque to the user which patterns might work and which might not.

Perhaps the name autoFill is also misleading... probably something like dragToCopy or dragToPaste would be more appropriate.

janisdd commented 2 months ago

I have changed my mind, it will be called dragToAutoFill and will be disabled by default.

Shipped with the next update.

janisdd commented 2 months ago

Actually, I have changed it to be an enum with none (default) and copyOnly. This allows me to add additional options later.

janisdd commented 1 week ago

@g-fleming After a lot of work and searching, I have found a better solution... Look out for the next version (but it will take a bit more time).