abe33 / atom-tablr

Edit CSV files using a table editor
MIT License
164 stars 44 forks source link

Auto-detect header? #1

Open bronson opened 9 years ago

bronson commented 9 years ago

I'm not quite sure how you would detect it but, if it has one, displaying the CSV's header would be nice.

Maybe add a pencil-everything button that would copy everything in row 1 into the A/B/C/D header displayed now?

And maybe if there are columns that are 100% digits except for the first row, you could just do this automatically?

screen shot 2015-07-31 at 12 59 30 am

Looking forward to auto-adjusting table widths!

abe33 commented 9 years ago

I made some research prior to implementing the csv support and it appears there's no reliable way to detect if a csv file has a header or not. What I can do though, is to have a command to use the first row as header after having opened the table, so that you can fix that if you have forgot to active the setting when opening the file.

bronson commented 9 years ago

That sounds like a fine solution.

Activate what setting when opening the file? A setting when opening with fuzzy-finder?

abe33 commented 9 years ago

When you open a csv (whatever the mean) there's the initial dialog when you can define the parsing setting: sample_csv_-__users_c_nehemie_gsoi_newho_vendor_gsoi_style-framework_-_atom

These settings are kept and serialized for later use. But if you have checked the Remember my choice checkbox you won't see that dialog a second time (it then stores the mode you used and use it immediately when reopening again the same file). Anyway, there's still a lot of little things that can be improved, I placed my focus on making the main workflow working so I didn't fine tune every little details.

dnk8n commented 8 years ago

Any plans to do the same for a row ID (as apposed to a column ID, aka Header)?