Re:JSON5 is a proposed extension to JSON
by GeneralMayhem on Monday March 03, 2014 @02:54AM
(#7332557)
>Sometimes it moves to a place where the indent level is different but the total number of expanded spaces is the same.
This is exactly why Smart Tabs is the only intelligent way to do it - if you change the width of a tab, everything resizes instantly to match the current user's aesthetics, but things that need to be aligned stay aligned. The only case in which it breaks is if you switch to a non-monospaced font, and in that case, God help you.
Just use a capable editor. It's 2014, for heaven's sake!
The problem occurs when you are SSH'ed to a machine you are setting up, or one that is customer owned, you use whatever editor is around to make a quick edit, not realising that the file labeled .conf is actually a YAML file, you hit tab because it makes logical sense and then shit breaks.
No thanks, YAML is a terrible choice for configuration files.
Re:JSON5 is a proposed extension to JSON
by GeneralMayhem on Monday March 03, 2014 @02:52AM
(#7332551)
If you're connecting to a machine over SSH and you're making enough changes that it's going to be difficult to maintain an indentation scheme, open it up on a local editor with SFTP. Emacs supports it out of the box, and Sublime has an excellent nagware SFTP package in the standard repos.
All YAML files are required to begin with "---". If you're aware of what YAML is, and you've seen YAML ebfore, and yet you somehow "aren't aware" that something is a YAML file, you're incompetent.
There is no requirement for a YAML file to begin with "---".
Look at the database.yml files that come with Rails applications, or look at the +MANIFEST file that pkgng requires on FreeBSD.
Those are yaml files, no triple dashes.
Calling me incompetent isn't helping your case either.
[1] Think in particular of when code moves around. Sometimes it moves to a place where the indent level is different but the total number of expanded spaces is the same. This looks fine until you look in another editor.