On 2017-07-17 23:25, Monte Goulding via use-livecode wrote:
Actually it’s quite helpful within strings. Consider a string to be
used with the merge function or just the likelihood of wanting a pair
of brackets in a string rather than a single one. As for quotes as
they are not valid within a string if you are typing one it’s highly
likely you want two and to concatenate something between. For example:
put “foo baz”
— come along later and edit to
put “foo” && tBar && “baz”
There is already an autocomplete preference which the bracket
completion and control structure completion checks but it’s currently
not exposed in the IDE UI. Do we want fine grained control over which
parts of autocompletion we want active? That could be confusing.
Bracket highlighting does need a color pref… I guess if this is empty
it could turn it off entirely if people want that.
I think it is worth having a preference for both highlighting and
completion - it serves people's individual tastes, and as long as the
preference is discoverable then it won't add any complexity.
Ideally highlighting would be context aware - so outside of a string, it
highlights other brackets outside of strings; but when in a string it
highlights brackets in strings:
put (1 "a(2" & tVar ")2" )1 after tFoo
(Numbers used to indicate matching pairs)
I was thinking in terms of syntactically - missing the point of
in-string highlighting (as HH and Mark Wieder pointed out).
Indeed, the current approach is an approximation to the ideal and adding
{ and } to highlighting wouldn't do any harm; and would serve the
use-case of JSON and similar generation.
In terms of ' then, for much the same reason that would probably be
useful - although that might require a bit more work on the highlighting
code as it isn't a matched pair (@montegoulding?).
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode