You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A significant part of community building around IDEs, involves the sharing of colour schemes, but doing so with RIDE currently involves manual surgery on ones prefs.json. See this comment to a broader issue.
While RIDE currently stores all user-made schemes in the user's prefs.json, IDEs often have a folder where schemes live as separate files. For the purposes of this discussion, let's call it /schemes/.
Should the 7 built-in schemes be represented as files?
Preferably, there should exist a GUI way to import a scheme from e.g. a downloaded file, in addition to the "advanced" method of dropping files into /schemes/.
We probably want to keep all the users active settings in their prefs.json so a viable approach might be to merge all the schemes from /schemes/ into prefs.json at startup time.
Since any custom scheme created from within RIDE lives in prefs.json, we need a method to export schemes to a file that can then be shared.
A possible interface could be as follows:
The two new buttons open file selection boxes. Export would extract the current scheme from prefs.js and place it into a a file (by default called ${currentSchemeName}.json). Import would allow choosing a file which would then be validated and if both valid and not conflicting with an existing scheme name (we could add (1) to the name if it conflicts), merged into prefs.js, also choosing that scheme as the new current scheme.
Based on the code in #749, it looks like it should be fairly simple to add this. Pop-up file selection dialogs are vailable via D.el.dialog.showOpenDialogSync.
This discussion was converted from issue #750 on July 27, 2021 07:31.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A significant part of community building around IDEs, involves the sharing of colour schemes, but doing so with RIDE currently involves manual surgery on ones prefs.json. See this comment to a broader issue.
While RIDE currently stores all user-made schemes in the user's prefs.json, IDEs often have a folder where schemes live as separate files. For the purposes of this discussion, let's call it /schemes/.
Preferably, there should exist a GUI way to import a scheme from e.g. a downloaded file, in addition to the "advanced" method of dropping files into /schemes/.
We probably want to keep all the users active settings in their prefs.json so a viable approach might be to merge all the schemes from /schemes/ into prefs.json at startup time.
Since any custom scheme created from within RIDE lives in prefs.json, we need a method to export schemes to a file that can then be shared.
A possible interface could be as follows:
The two new buttons open file selection boxes. Export would extract the current scheme from prefs.js and place it into a a file (by default called
${currentSchemeName}.json). Import would allow choosing a file which would then be validated and if both valid and not conflicting with an existing scheme name (we could add(1)to the name if it conflicts), merged into prefs.js, also choosing that scheme as the new current scheme.An example scheme file:
{ "name": "Dracula", "theme": "dark", "styles": "asgn=fg:#50fa7b com=fg:#6272a4 diam=fg:#ff79c6 err=fg:#ff5555,bgo:1,U fn=fg:#8be9fd idm=U kw=fg:#ff79c6 lnum=bgo:0,fg:6272a4 mod=bgo:0.5,bg:#44475a mtch=bgo:0.5,fg:#f8f8f2,bg:#44475a norm=bg:#282a36,bgo:1,fg:f8f8f2 num=fg:#bd93f9 op1=fg:#50fa7b,fgo:1 op2=fg:#f1fa8c quad=fg:#ffb86c sel=bg:#6bb2ff,bgo:0.5 semi=fg:#50fa7b sqbr=fg:#50fa7b srch=bg:#bd93f9,bgo:0.5 str=fg:#f1fa8c tc=bg:#44475a,bgo:1 tcpe=bg:#44475a,bgo:1 zld=fg:#bd93f9 scmd=fg:#ff79c6 ucmd=fg:#ff79c6,B vtt=bg:#44475a,bgo:1 ca=bg:#44475a,bgo:1,fg:#ff5555 cm=bg:#282a36,bgo:1,fg:#50fa7b cv=bg:#44475a,bgo:1,fg:#f1fa8c cvv=bg:#282a36,bgo:1,fg:#8be9fd ma=bg:#44475a,bgo:1,fg:#8be9fd na=bg:#44475a,bgo:1,fg:#bd93f9 qor=bg:#ff5555,bgo:1,fg:#f8f8f2 dc=bg:#6272a4,bgo:1 lbl=fg:#ff79c6,B glb=fg:#ffb86c cubr=fg:#f8f8f2 par=fg:#f8f8f2 dfn=fg:#f8f8f2 qdl=fg:#f8f8f2 cur=fg:#f8f8f2,fgo:1 acsl=bg:#bd93f9,bgo:0.25" }Based on the code in #749, it looks like it should be fairly simple to add this. Pop-up file selection dialogs are vailable via
D.el.dialog.showOpenDialogSync.Beta Was this translation helpful? Give feedback.
All reactions