vscode-edit-csv
vscode-edit-csv copied to clipboard
Column filtering
Version?
VS Code plugin
Feature
I'd like to use column filtering. Lets assume that I have a log file with a LogLevel
column. It'd be nice to filter by Error
. A nice additional feature would be that the addon keeps the same row/column selected even when I remove the filter to be able to see the rows surrounding the row where I previously found the Error
.
Example:
Row | Timestamp | LogLevel | Message |
---|---|---|---|
1 | 2020-10-27 01:00 | Information | Some information |
1..100 | many | skipped | lines |
101 | 2020-10-27 02:00 | Error | Some error |
102 | 2020-10-27 02:01 | Information | Some information |
Filtering by Error
:
Row | Timestamp | LogLevel (filtered) | Message |
---|---|---|---|
101 | 2020-10-27 02:00 | Error | Some error |
Select row 101
Row | Timestamp | LogLevel (filtered) | Message |
---|---|---|---|
101 | 2020-10-27 02:00 | Error | Some error |
Remove filter:
Row | Timestamp | LogLevel | Message |
---|---|---|---|
1 | 2020-10-27 01:00 | Information | Some information |
1..100 | many | skipped | lines |
101 | 2020-10-27 02:00 | Error | Some error |
102 | 2020-10-27 02:01 | Information | Some information |
Row 101 should remain selected and still be visible (in view).
Additional thoughts
It seems that this functionality is already in the excel viewer plugin, so I guess that it's not super important, but it would be very convenient. as the excel doesn't show row numbers by default (except when explicitly enabled by the csv-preview.lineNumbers
setting).
EDIT: Added additional thoughts EDIT2: Updated information on the Excel Viewer line numbers
I see this can be useful and it would be a nice feature. However, in handsontable 6.22 this is a pro feature meaning I would have to rebuild the whole functionality (which takes a lot of time). As you mentioned the Excel Viewer plugin already has this functionality. For now you are better off with Excel Viewer.
We can leave this open, maybe I'll do it in the future sometime.
@fubar-coder The next update will bring multi column sorting. I think when you filter by LogLevel you will get all "Error" Rows. This also enables you to sort by "LogLevel" first and then by "timestamp" (to get a chronological view).
To sort by multiple columns you need to hold ctrl/cmd and click on the column(s).