question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hardcoded default settings is not eq new generated default.json (cudatext-linux-gtk2-amd64-1.107.2.0)

See original GitHub issue

CudaText uses a hardcoded default config. At the same time, the default config is stored in the default.json file, which serves to show the user examples of settings and their initial values. This config (along with built-in plugins) can recreate the cudatext executable if the config has been deleted. That is, only the binary is really enough. to start working minimally.

Experiment.

Move config dir to backup:

$ mv ~/.config/cudatext/ ~/.config/cudatext.bak/

Start and stop CudaText:

$ /usr/bin/cudatext
^C

CudaText created a config directory with default data. Compare the generated file with the file from the distribution kit:

$ diff ~/.config/cudatext/settings_default/default.json ~/.config/cudatext.bak/settings_default/default.json 
588a589,591
>   //UI tabs: global visible flag for ui-tabs
>   "ui_tab_show": true,
> 
1156,1157c1159,1160
<   //[Ui/Toolbars]
<   //Show sidebar (vertical bar on the left side)
---
>   //[Ui/Panels]
>   //Show sidebar (vertical bar with buttons on the left side)
1160c1163
<   //Show sidebar on the right side
---
>   //Place sidebar on the right side
1167c1170
<   //Show toolbar (horizontal bar, below window title)
---
>   //Show toolbar (horizontal bar with buttons, below window title)
1176a1180,1191
> 
>   //Side-panel's visible state on program start
>   //  0: Restore state from history file
>   //  1: Show
>   //  2: Hide, program shows panel if needed
>   "ui_sidepanel_on_start": 0,
> 
>   //Bottom-panel's visible state on program start
>   //  0: Restore state from history file
>   //  1: Show
>   //  2: Hide, program shows panel if needed
>   "ui_bottom_on_start": 0,

We see that the newly created file default.json does not contain the latest features that are actually in this beta and that are present in the config from the distribution.

Conclusion: the binary contains two copies of the config. One actually uses, the other serves as a template for generating a json file. And they are different - the template remained from the previous version, where the latest features were missing.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wb027commented, Jul 21, 2020

I’ll go to the pharmacy, ask if they have ashes so I can powder my hoarhead.

1reaction
Alexey-Tcommented, Jul 21, 2020

Added more info to https://wiki.freepascal.org/CudaText#Linux_installation It solved this question

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found