Natanox@discuss.tchncs.de to linuxmemes@lemmy.worldEnglish · 14 days agoJust edit the config file, so easy!discuss.tchncs.deexternal-linkmessage-square125fedilinkarrow-up1893file-text
arrow-up1893external-linkJust edit the config file, so easy!discuss.tchncs.deNatanox@discuss.tchncs.de to linuxmemes@lemmy.worldEnglish · 14 days agomessage-square125fedilinkfile-text
minus-squarepaequ2@lemmy.todaylinkfedilinkEnglisharrow-up20·edit-213 days agoYeah, I’ve definitely grown to like TOML, especially after spending hours trying to edit a giant (nested) YAML file… I didn’t realize the indentation in TOML was purely aesthetic. This [servers] [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" equals this [servers] [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" which equals this { "servers": { "alpha": { "ip": "10.0.0.1", "dc": "eqdc10" }, "beta": { "ip": "10.0.0.2", "dc": "eqdc10" } } }
minus-squareFushuan [he/him]@lemm.eelinkfedilinkEnglisharrow-up5·13 days agoOnce the file is big enough wouldn’t it be better to convert it to json before editing, then converting it back? Let the computer deal with indents and all that stuff.
minus-squarepaequ2@lemmy.todaylinkfedilinkEnglisharrow-up1·13 days agoBecause … well … wait, not a bad idea. Although, this would get rid of comments. Which in my case, I didn’t have too many, so I could have manually added them back.
Also TOML lol
Yeah, I’ve definitely grown to like TOML, especially after spending hours trying to edit a giant (nested) YAML file…
I didn’t realize the indentation in TOML was purely aesthetic.
This
equals this
which equals this
{ "servers": { "alpha": { "ip": "10.0.0.1", "dc": "eqdc10" }, "beta": { "ip": "10.0.0.2", "dc": "eqdc10" } } }
Once the file is big enough wouldn’t it be better to convert it to json before editing, then converting it back?
Let the computer deal with indents and all that stuff.
Because … well … wait, not a bad idea. Although, this would get rid of comments. Which in my case, I didn’t have too many, so I could have manually added them back.