Feature Requests
AshishShanker opened this issue · 3 comments
@laktak - I'm a ST3 noob so haven't yet figure out how to do this (or if it is at all possible), but I would like to see the following in sublime-hjson:
- Block commenting: In other languages / syntax definitions, I am able to do a Ctrl + Shift + / to comment out some code selection using the appropriate block commenting mechanism. Currently that is not possible in sublime-hjson. I understand that Hjson has only line level comments, so the preferred behavior would be to either offer multi-line comments (## ?) or simply prepend the entire selection with hashes (#)
- Coding in Hjson could be greatly enhanced, if the package could figure out that a key or value needs quotes and then apply the quotes directly. That way, the user coding by hand doesn't need to get back to fixing up the code.
Good idea, I fixed 1 for you - it should update on the new packagecontrol.io soon.
I don't think 2 is possible - if you write true
the editor can't know if you want the boolean value or the text.
For 2, my request was to enable auto-quoting for the keys only, not values. So if you are typing a key you don't need to quote it but as soon as you type a non-alpha numeric the quotes kick in. Alternatively you could have the quotes kick in after the key is compete and the user types the following colon.
The process would have to work in reverse as well: as soon as the "offending" characters from the key disappear, the quotes get taken out as well. Again, you could have once check that triggers upon typing the colon which determines if the key needs to be quoted or not.
The Hjson definition for Sublime is mostly xml/regex. I guess you could do this with another plugin but I'm not a ST3 expert either.