missing package settings
luispfonseca opened this issue · 12 comments
The settings for the package do not appear inside Preferences -> Package Settings. I need to change the "rainbow_csv_max_file_size_bytes" setting and can't find where to. My Sublime Text is 3.1.1, Build 3176 and I'm using a portable version. Do you know what might be the issue?
Same problem. How can I disable autodetect? (where can I set "enable_rainbow_csv_autodetect": false
?)
Sorry about late reply, guys.
For now you can add this setting by clicking "Preferences"->"Settings"
and then add the following line into the right (User) file: "enable_rainbow_csv_autodetect": false
(don't forget to add a comma for the previous lines if you have it).
Actually I just found out that many other sublime plugins implement custom plugin settings available through Preferences -> Package Settings. I will also implement such configuration feature for rainbow csv, but it may take some time.
For now you can add this setting by clicking "Preferences"->"Settings"
and then add the following line into the right (User) file:"enable_rainbow_csv_autodetect": false
(don't forget to add a comma for the previous lines if you have it).
I tried it and it doesn't work for me. I always thought that plugin settings are independent of the settings of Sublime itself (just a guess, I don’t know for sure). It is possible that because of this, the autodetection disable does not work for me.
Actually I just found out that many other sublime plugins implement custom plugin settings available through Preferences -> Package Settings. I will also implement such configuration feature for rainbow csv, but it may take some time.
Thank you. Looking forward to it.
And thank you for this userful plugin.
Well, this parameter has very non-intuitive behavior (I will update the documentation in the new version to describe it better), but here how it actually works: If Rainbow CSV had seen a file once and decided to highlight it, it will always be highlighted (no matter what the value of "enable_rainbow_csv_autodetect" is) until you manually disable highlighting for that file. So the setting will work for new files, but not for old ones. Also it will not affect files with ".tsv" and ".csv" extensions - these would always be highlighted anyway. So maybe you've just tried the settings with files that you've already opened before and therefore got an impression that setting doesn't work, while it actually does. Could you please try to rename a file (just don't use ".csv" or ".tsv" extension) and open it again with Sublime - it shouldn't be higlighted this time.
BTW, @dmi7ry , can I ask you, why do you want to disable autodetection mechanism?
I see. Indeed, it works for new files. How can I erase information about previously opened files?
Could you please try to rename a file (just don't use ".csv" or ".tsv" extension) and open it again with Sublime - it shouldn't be higlighted this time.
My files has .log
extension. And yes, I opened these files before.
The reason is very simple. It wrongly detects some files and then opens them very slow (10 seconds instead of instantly, 40 seconds instead of a second, etc)(on i9-9900K)
To disable highlighting for a file do this:
On opened and highlighed file -> Right Click -> Rainbow CSV -> Disable
Or you can manually edit ~/.rbql_table_index file - just delete wrong lines from it.
Thank you for describing your usecase, I will probably limit the size of autodetected files, looks like this is a common problem
BTW in the next version I will try to get rid of ~/.rbql_table_index file - storing settings in home folder is very poor design decision.
To disable highlighting for a file do this:
On opened and highlighed file -> Right Click -> Rainbow CSV -> DisableOr you can manually edit ~/.rbql_table_index file - just delete wrong lines from it.
Thank you
Thank you for describing your usecase, I will probably limit the size of autodetected files, looks like this is a common problem
I think it's already skips large files. I can't say exact sizes, but just as an example on files I can check right now:
it autodetects and opens 6.1MB file about 8-9 seconds, autodetects and opens 3.4MB file about 4-5 seconds, doesn't detect 36MB file (so, Sublime opens it less than an one second).
Well, this parameter has very non-intuitive behavior (I will update the documentation in the new version to describe it better), but here how it actually works: If Rainbow CSV had seen a file once and decided to highlight it, it will always be highlighted (no matter what the value of "enable_rainbow_csv_autodetect" is) until you manually disable highlighting for that file. So the setting will work for new files, but not for old ones. Also it will not affect files with ".tsv" and ".csv" extensions - these would always be highlighted anyway. So maybe you've just tried the settings with files that you've already opened before and therefore got an impression that setting doesn't work, while it actually does. Could you please try to rename a file (just don't use ".csv" or ".tsv" extension) and open it again with Sublime - it shouldn't be higlighted this time.
BTW, @dmi7ry , can I ask you, why do you want to disable autodetection mechanism?
Same here. It's not that I want to disable the automatic highlighting; I just want it to be optional when the file is large. For large data files I have stored in csv, it makes opening sublime really slow and I just kill the process rather than wait for it to end.
I've tried including the rainbow_csv_max_file_size_bytes
option in the sublime settings and it seems to work. Thank you!
You are welcome!
Please don't close the issue - I'll do it once I add the custom settings mechanism.
So, I've published version 1.0.0 which enables Preferences -> Package Settings for rainbow csv. It also includes some other minor changes that I mentioned here, see release notes.