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

[Feature request] Linebreaks in the overview #151

Open m8r1us opened 3 months ago

m8r1us commented 3 months ago

Thank you for making this plugin available.

Version?

vs code plugin

Feature

Maybe a bit of a funky feature request, but would it be possible to implement a feature to render line breaks. For example, a csv file uses the pattern &vbLf as a "line break". When the CSV is loaded into the plugins overview, the &vbLf is interpreted and displayed as a line break. When applying changes to the file, the line breaks are changed back to &vbLf.

janisdd commented 3 months ago

Interesting idea but I'm not sure how this can be done...

Maybe you can give an example.

When I think about it, you would end up with a single line in the editor.

file

a b c &vbLf d e f &vbLf
g h i &vbLf j k l &vbLf

as table

a b c
d e f
g h i
j k l

then convert all line breaks to &vbLf

a b c &vbLf d e f &vbLf g h i &vbLf j k l

Alternatively, you could somehow save the original line breaks and try to restore them. This may not always be possible as the user can remove rows/columns and add new ones.