Menu

#141 Syntax Coloring: Variable References in Double Quotes

Next Release
open
nobody
5
2016-05-12
2011-07-12
John Vilk
No

Would it be possible to syntax color variable references in double quotes? I'm currently working on a project that involves bash script generation, and this would help me ensure that I am properly escaping bash variable references, while not escaping perl variable references (granted, EPIC will tell me if compilation fails because I am using an undefined variable, but the visual confirmation is still very useful).

vim currently does this, although it messes up on hash/object/array references (e.g. in the examples "$foo->{bar}", "$foo{bar}", "$foo->bar()", and "$foo[0]", vim will highlight $foo as a variable, but will leave the rest of the characters highlighted as a string). It would be ideal if EPIC would highlight both parts properly.

Thanks in advance!

Discussion

  • Jan Ploski

    Jan Ploski - 2011-07-12

    It would be possible and useful, but tricky (reentrant parser). That means, it isn't going to be implemented any time soon.

     
  • John Vilk

    John Vilk - 2011-07-12

    Just realized that the "$foo->bar()" example is invalid... whoops.

    I figured that this might be difficult. Thanks for replying.

     

Log in to post a comment.