"Table" - Format
-
- Posts: 2
- Joined: 21.09.2023 14:03
"Table" - Format
Hello,
I have the following issue: There is a good amout of file formats (most notably .csv) which use plain-text to store table-data.
This always results in one out of two:
- If no formatting other than the separator is used, the files are unreadable with common text-editors, despite being plain-text, because the columns are not aligned.
- If (usually whitespace-) formatting is used to make it readable then the effort to maintain formatting quickly explodes with filesize to the point where files must be written through some formatting-script.
So what i'd like is a text-editor capable of displaying plain-text-table-files as actual tables, given a separator. It does not need to be fancy, we have Excel for fancy. Simply lining up the separators vertically would be enough. Since i already use CudaText and like it very much i was wondering if it's possible to implement such a feature. Preferably such that it can be associated with a lexer and supporting arbitrary separators.
I have the following issue: There is a good amout of file formats (most notably .csv) which use plain-text to store table-data.
This always results in one out of two:
- If no formatting other than the separator is used, the files are unreadable with common text-editors, despite being plain-text, because the columns are not aligned.
- If (usually whitespace-) formatting is used to make it readable then the effort to maintain formatting quickly explodes with filesize to the point where files must be written through some formatting-script.
So what i'd like is a text-editor capable of displaying plain-text-table-files as actual tables, given a separator. It does not need to be fancy, we have Excel for fancy. Simply lining up the separators vertically would be enough. Since i already use CudaText and like it very much i was wondering if it's possible to implement such a feature. Preferably such that it can be associated with a lexer and supporting arbitrary separators.
-
- Posts: 2269
- Joined: 25.08.2021 18:15
Re: "Table" - Format
such aligning is not possible, Cud is not a table-editor, sorry.
this table-editing will need big rework of the editor base.
but we have the plugin 'CSV Helper' which makes nice coloring of CSV and TSV (tab-separated values) files.
this table-editing will need big rework of the editor base.
but we have the plugin 'CSV Helper' which makes nice coloring of CSV and TSV (tab-separated values) files.
-
- Posts: 67
- Joined: 26.08.2013 06:16
Re: "Table" - Format
possible via Markdown + some plugins…
- Attachments
-
- 1min08sec.zip
- (4.84 MiB) Downloaded 78 times
-
- Posts: 2269
- Joined: 25.08.2021 18:15
Re: "Table" - Format
Markdown don't allow aligned editing of table, none of text formats allow this of course.
-
- Posts: 2
- Joined: 21.09.2023 14:03
Re: "Table" - Format
I feared it would be beyond a simple plugin or easy rework...
I'll have to keep looking then. Or try writing something myself.
I'll have to keep looking then. Or try writing something myself.
-
- Posts: 2269
- Joined: 25.08.2021 18:15
Re: "Table" - Format
what you can do with plugin API: make a _modal_ dialog (over the editor) which can have 'listview' control (looks like a table). listview control don't give the editing of table cells, only viewing. so dialog will be very limited.
Im not sure we need the 'grid' control in our API, noone was needing that. 'grid' control is much much more good for tables and gives the editing.
'grid' control is what the 'Edit / Char Map' dialog is using.
Im not sure we need the 'grid' control in our API, noone was needing that. 'grid' control is much much more good for tables and gives the editing.
'grid' control is what the 'Edit / Char Map' dialog is using.
Re: "Table" - Format
Hello, I can't find the plugin "Markdown Table Format" which is used in the video. Is it a published plugin for cudatext?
Thanks!
-
- Posts: 2269
- Joined: 25.08.2021 18:15
Re: "Table" - Format
Plugin 'Markdown Table Format' was converted to CudaFormatter's formatter: 'Markdown Tables'.
Re: "Table" - Format
Got it!main Alexey wrote: ↑30.09.2023 09:31 Plugin 'Markdown Table Format' was converted to CudaFormatter's formatter: 'Markdown Tables'.
Is it possible to make this formater avilable for .txt format too? I can change the lexer at bottom, but if there is a more convenient way to use the formatter for more than one lexer?
Thanks!
-
- Posts: 2269
- Joined: 25.08.2021 18:15
Re: "Table" - Format
1. why to use MARKDOWN formatter for .txt format? txt format is some random data.
2. but you can do it.
- install lexer "Text with indentation"
- assign Markdown formatter to this lexer. do it in the formatter's install.inf file (folder py/cuda_fmt_markdown_table).
2. but you can do it.
- install lexer "Text with indentation"
- assign Markdown formatter to this lexer. do it in the formatter's install.inf file (folder py/cuda_fmt_markdown_table).
Code: Select all
[fmt1]
caption=Markdown Table Format
method=do_format
lexers=Markdown,Text with indentation
config=cuda_markdown_table_format.json