wadetb / Sublime-Text-Advanced-CSV

Efficiently format, edit, arrange, and evaluate cells in CSV files
169 stars 14 forks source link

Justify/Compact columns removes quotes around fields that don't contain delimiter characters #37

Closed christianhans closed 7 years ago

christianhans commented 7 years ago

Hi,

Using this CSV file:

"a",b  
123,"45,6"

Then performing justify columns results in this CSV file:

a  ,b     
123,"45,6"

I.e. the quotes around the first field in line 1 are removed. Same happens for compact columns.

I see why quotes are not preserved - they are not necessary in line 1 since no delimiter is contained in these fields.

However, CSV files I work with usually have all fields quoted, regardless of whether they contain delimiters or not. Using justify or compact columns on these fields alters the original file.

Maybe removing quotes from fields not containing delimiters should be configurable?

Best regards Christian

wadetb commented 7 years ago

Per #36, this is the auto-quoting system. You can disable it by adding "auto_quote": false to the User settings file.