vkocubinsky / SublimeTableEditor

This package is no more supported. I moved to vim.
Other
494 stars 67 forks source link

Convert table to CSV? #46

Open drlabratory opened 10 years ago

drlabratory commented 10 years ago

Love this extension, any chance you could implement the reverse? Would be a perfect way to get data into CSV format without having to fire up the E word.

vkocubinsky commented 10 years ago

Hi, thanks for feedback.

I am going to add export to CSV into Table Editor. I think it will be implemented on next way, when cursor on a table and user click export key , Table Editor will open new buffer and add to the buffer CSV representation for current table. I will use standard python csv module for implementation. Python csv module provides specify parameters for export, I will propagate some of these parameters to Table Editor configuration.

Thanks!

laudenberg commented 10 years ago

I haven't looked at the code in much detail but it might be easier and more natural to implement CSV as just another syntax mode. The different dialects (separator, quotes, ...) would be options similar to alignment.

vkocubinsky commented 10 years ago

I guess support csv as just another syntax is out of scope table editor, the main goal of csv is moving data between applications. In case if need edit csv file, I guess csv mode should be responsible for this.

Let me show only one problem with csv as just another table syntax. Table editor recognise text with .sublime-keymap file. Keymap file bind keys for a line starts with '|'. For csv we can not say a simple rule for recognise csv block.

laudenberg commented 10 years ago

Thanks for your input. I think I'm going to try it out myself and see where it goes. Glad you're doing the export stuff, though. Great job so far!