plugin CSV Helper

Plugins for SynWrite and CudaText...
Post Reply
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

plugin CSV Helper

Post by Alexey »

For CSV files, it highlights different CSV columns in different colors.
It is inspired by Sublime Text plugin "Rainbow CSV".
Requires "CSV" pseudo lexer (empty) from Addon Manager, install this lexer first.

Also plugin handles hovering mouse over text: it shows index/caption of current CSV
column in the statubar (caption is read from the 1st line).

Plugin has several options in config file. Call config by menu "Options / Settings-plugins / CSV Hilite".

Code: Select all

[op]
color_comma=#000000
colors_fixed=#0000FF,#00AA00,#E00000,#000080,#004400,#900000,#909000
colors_themed=Id,Id1,Id2,Id3,Id4,IdVar,String,Comment,Comment2,Label,Color
use_theme_colors=1
Screenshot
Attachments
Screenshot from 2018-12-16 12-42-55.png
hexaae
Posts: 69
Joined: 25.02.2019 20:47

CSV Helper plugin: change CSV delimiter?

Post by hexaae »

How can I change CSV delimiter... instead of "," use ";" for example...?
Lexer Properites menu does nothing (no configuration available?).
Need to manually edit "cuda_csv_hilite.ini", no config panel?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Change CSV delimiter?

Post by main Alexey »

do you have plugin CSV Helper installed?
if so, you have lexer 'CSV ^' availalble.
activate it.
menu item "Options / Settings-plugins / CSV Helper".
config file opens, in it you have option "separator".
hexaae
Posts: 69
Joined: 25.02.2019 20:47

Re: Change CSV delimiter?

Post by hexaae »

Ah, sorry forgot it was in the separate Plugin > CSV Helper menu... never mind. Thank you.
I was looking for it through Options > Lexer... > Properties
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Change CSV delimiter?

Post by main Alexey »

'Lexer properties' lists only options avaiable in lexer. And this option is not in the lexer. It is in the CSV_Helper python code.
hexaae
Posts: 69
Joined: 25.02.2019 20:47

Re: plugin CSV Helper

Post by hexaae »

...Two more questions:
1: how do I specify a <tab> character in the delimiter (separator=) of CSV Helper?
2: is it normal if I edit and save the new "separator=" it will be reverted to previous, unless I save AND quit Cudatext, and then relaunch it?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: plugin CSV Helper

Post by main Alexey »

1. Using "Plugins / CSV Helper / Set separator ......." menuitem.
But if file has TSV extension, tab-char will be used auto.

2. Why do change 'separator' in config file? why not to call menu item from (1)? menu item is better.
hexaae
Posts: 69
Joined: 25.02.2019 20:47

Re: plugin CSV Helper

Post by hexaae »

Mmh, ok I'll use Plugins > CSV Helper > Set separator for current document...

Is there a way to specify a hex number, since some unusual separator chars may not be entered with keyboard input, just like TAB?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: plugin CSV Helper

Post by main Alexey »

it may be added, if it's really needed. but TAB-char is supported - enter "\t" in dialog. I will improve prompt-string to show "\t" variant.
hexaae
Posts: 69
Joined: 25.02.2019 20:47

Re: plugin CSV Helper

Post by hexaae »

Thank you.
Post Reply